I update my DB using UpdateRowBatch event on a button click.
After adding WARP and the column sort feature I now have the problem of the UpdateRowBatch event getting fired when the user clicks the async SortColumn.
Trying to find out if any one might know of a work around to prevent the UpdateRowBatch from getting fired until there is a Full Postback?
Thanks
Hi Lyuba,
Works perfect now...thanks
Thanks for the suggestions. I just finished writing wrappers for the UpdateRowBatch and UpdateGrid events. The WebTab page has its own VB page with the Grid page defined as user control. In the WebTab page I know when its ASYNC vs FULL postback and I know when the SAVE button was cliked so I can just reference the wrapper code and process the Rows myself for the update. The real events now do nothing when triggered. I already have a hidden DirtyBit flag in the Grid so I can only process the rows that changed when I loop them
Should Work I am about to test and will let you know.
From the WebTab page on a FULL postback and submit = TRUE I call the wrappers
[CA].DrawWebGrid1_UpdateRowBatch_Wrapper(m_tablbl)[CA].DrawWebGrid1_UpdateGrid_Wrapper(m_tablbl)
Protected Sub DrawWebGrid1_UpdateRowBatch(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.RowEventArgs) Handles DrawWebGrid1.UpdateRowBatch End Sub
Public Sub DrawWebGrid1_UpdateRowBatch_Wrapper(ByVal Tab As String)
......loop the rows and call the real Update Code here
End Sub
Hi Ed,
Another idea that came into my mind is, that you can handle BeforeSort clientside event and there you can show a confirm javascript message saying that your changes will be lost and suggestion to save your data first. You can cancel the sorting by returning true in the BeforeSort event. In the UpdateRowBatch you can cancel the update if it is coming after the sorting.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Ed,
I managed to replicate this with 6.3.20063.53. Unfortunately I don’t think there is an easy way with which you can stop the UpdateRowBatch event from firing…
Isn’t the sorting on the client an option for you?
No not solved yet ,Evereything is proprietary where I work so hard to send code samples. If you tell me the relevant parts you would need to see I can probably send snipets. grid aspx layout stuff etc
I have read conficting info: This says it will fire no matter what (full or asyn postback) http://weblogs.asp.net/tonylombardo/archive/2008/01.aspx This seems to say it won't fire http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7198
The version I am using is 6.3.20063.53. Nothing I can do about that at the moment. Upgrade is not an option we have to many apps deployed, we will get there some day.
My only workaround I see other than pulling the WARP panels is to write wrappers for the UpdateRowbatch and UpdateGrid events and control the row updates myself because I know if the postback is asyn or full, but painfull.
In your test did you edit the grid and make it dirty before doing the column sort? You need to do an update to the grid first. When I do it the events fire in this order
DrawWebGrid1_SortColumnDrawWebGrid1_UpdateRowBatchDrawWebGrid1_UpdateGridUltraWebTab1_PreRenderDrawWebGrid1_PreRender