Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select row in a datagrid

Status
Not open for further replies.

sueco8

Programmer
Mar 30, 2003
4
ES
Hello

I have a DataGrid (System.Web.UI.WebControls.Datagrid) with a select button column. If I select a row with this button, page refreshes but then datagrid shows since frist row and I have to scroll down to look for the select row.

How can I force the grid to refresh without moving to a different row? If datagrid was a System.Windows.Forms.Datagrid I think this is possible calling Refresh method, but in this Webcontrol this method doesn't exist.

Thanks for your help.
 
You can use javascript or smartnavigation to maintain position but smart navigation can be troublesome. There are simple javascript functions (where you just use the .focus method in javascript and Page.RegisterStartUpScript to register the script for a certain control) or there are more complex methods such as:




____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top