Wednesday, March 28, 2012

UpdatePanel - Single GridView row

I have a GridView where the database query is rather slow. I would like to use the UpdatePanel when editing a single row. Placing the entire grid inside of an UpdatePanel causes the entire grid to bind to the data source which takes several seconds. Is there a way to only update the row being edited by placing the UpdatePanel inside of the ItemTemplate or something like that? I haven't been able to figure this out. I'm sure I've seen an example of something similar to this but can't find it.

Thanks for any help.

You can add UpdatePanel to ItemTemplate/EditTemplate but you will end up with more HTML and javascript on client side.

I would rather focus on finding out why the query takes longer to execute? and fixing it.

Use serverside paging, caching to speed it up. Take a look at ScottGu's Weblog:http://weblogs.asp.net/scottgu/archive/2006/03/22/Efficient-Data-Paging-and-Sorting-with-ASP.NET-2.0-and-SQL-2005.aspx

No comments:

Post a Comment