Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
930
UpdateCellBatch: Check where postback comes from
posted

Hi,

I have a class that represents a grid, inheriting from UltraWebGrid. In the OnLoad method I set an eventhandler for UpdateCellBatch (called Grid_OnUpdateCellBatch). On the page where the grid resides, there are multiple controls that can trigger a post-back. If some changes have been made to the grid and the user initiates a postback with one of these controls, the Grid_OnUpdateCellBatch function is invoked regardless of which control was used. Can I somehow ensure that the work of Grid_OnUpdateCellBatch will only be done if a specific control is clicked? How?

I am not sure how it can be done as the only information that is sent to Grid_OnUpdateCellBatch is the "sender" which is the grid itself and the CellEventArgs which does not hold information about anything else than the row+cells that were updated. If only I could get access to the Request...... Then I could use this method: http://ryanfarley.com/blog/archive/2005/03/11/1886.aspx

Regards,