Harri's profilePainKiller´s C# CornerBlogListsNetworkMore ![]() | Help |
|
|
Problem with gridview or any other asp control eventsIn my current project I had problem with the execution orders on a ASP.NET page, I use a databound gridview, that databinds in PageLoad. But when I then hit the select row and that event fires I dont want to databind on PageLoad of course, but how to I do that? The Execution order is first PageLoad then SelectedRowChange on the gridview. This is my solution:
if (Request.Form["__EVENTTARGET"] != GridView1.UniqueID){ GridView1.DataBind(); } Note that I can do a check of what triggered the page reoload, and then skip the databinding if the gridview populated this, because i know that the row index change event on the gridview will take care of the databinding. Time for lunch now :-) TrackbacksThe trackback URL for this entry is: http://csharp3.spaces.live.com/blog/cns!E0D0E097982463FD!190.trak Weblogs that reference this entry
|
|
|