See you there.
You've been kicked (a good thing) - Trackback from DotNetKicks.com
This is really good food for thought. I've seen pages that could probably benefit a great deal by applying what you explained here.
However, in the example you've given (selecting a row in the gridview and displaying the associated data in the detailsview),I don't think your approach is correct. :)
I haven't actually tested this, but... If you do not allow the updatepanel containing the gridview to update when a row is selected, then, although the details view will show up, the row selected in the gridview won't be highlighted (which is what, I think most people would expect to happen).
Dough, that is correct, in that the selected row won't get hilighted. Not the most perfect example as you have already noted :-)
I've tried to keep things as simple as possible. It can get complex. In my case i have my detailsview normally in a modal popup so showing the selected row at the expense of pulling the entire contents of the gridview is not bringing much to the table (until the modalpopup has been closed, which is when i let the gridview refresh with the selected row).
Also due to the expensive nature of the operation, row selection can be done differently at the cost of extra effort naturally by the dev, maybe by selecting the row through script or other means. Ofcourse, at the end, the decision soley depends on the dev.
i knew something did not sound right, when i read
"...and the second thing is ChildrenAsTriggers='true', both of which..."
but, we all knew you meant "false"
John, many thanks for correction :-)
Very interest and helpfull in may case. Thanks a lot.
This is a good example but I ran into problems. My gridview which was working perfectly fine, had problems in paging when put in an updatepanel. It always showed the first page. When I went to second page, it showed the first page but in details view showed records from second page.
Setting UpdateMode="Always" and ChildrenAsTriggers="True"
resolved the problem.
Thanks. It helped me to understand the concept very well
Pingback from ASP.NET e o Update Panel « Diego Don?? | Designer, Developer
Pingback from Updatepanel updatemode | Fantasywearonl