开发者

How can I determine if a DataGrid has been sorted or paged, prior to the events being triggered?

开发者 https://www.devze.com 2023-01-04 15:08 出处:网络
I have a DataGrid that has event handlers bound to SortCommand and PageIndexChanged.How can I determine if those event handlers are about to be called, say on page_load开发者_StackOverflow?

I have a DataGrid that has event handlers bound to SortCommand and PageIndexChanged. How can I determine if those event handlers are about to be called, say on page_load开发者_StackOverflow?

These events will fire just fine after page_load, but I'd like to know at page_load if they are to be fired.


Request.Form["__EVENTTARGET"] and Request.Form["__EVENTARGUMENT"] will give the object causing the post back and the event argument. If the data grid does not cause the postback, then there is likely a value somewhere in the post. Use Fiddler to look at the request being sent when the button is clicked.

0

精彩评论

暂无评论...
验证码 换一张
取 消