Alessandro Zifiglio

Reducing UpdatePanel bloat by utilizing UpdateMode="Conditional" and ChildrenAsTriggers="false"

All posts have moved to Typps

See you there.

Alessandro

Comments

Doug said:

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).

# January 30, 2008 9:05 AM

alessandro said:

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.

# January 30, 2008 9:41 AM

johny said:

hey there.

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"

# March 9, 2008 10:56 PM

alessandro said:

John, many thanks for correction :-)

# March 10, 2008 6:20 AM

Yura Zaletskyy said:

Very interest and helpfull in may case. Thanks a lot.

# August 10, 2008 3:31 PM

jamesbond11 said:

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.

# September 10, 2009 3:44 PM

Biju said:

Thanks. It helped me to understand the concept very well

# June 15, 2010 12:36 AM