Hi,
I have a ultrawebgrid, which is set as
ContractsGrid.Browser = BrowserLevel.Xml; ContractsGrid.DisplayLayout.LoadOnDemand = LoadOnDemand.Xml;
for paging large number of rows.
My requirement is that when user changes the values in a row,
1.the changes are saved to the database from the OnRowUpdate event on serverside. This works fine.
2.Display a label message saying the update was successful. Even though I update the label.Text inside the RowUpdate Event, it does not reflect on the front end. I believe this is because of the ajax callback within the grid, that is not really doing a complete postback.
If I change the loadondemand to NotSet, then it shows the label, but the grid load becomes extremely slow.
How I can update the label text, keeping the LoadOnDemand as xml itself?
I tried wrapping everything in WebAsyncRefreshPanel, leaving the LoadOnDemand as is, but it still did not help.
Please let me know soon what is a solution for this.
Hi Rajani,
Your observations are completely right - the ajax callback does not update any content outside of the grid. To resolve the issue I suggest placing the grid and the label inside an UpdatePanel.
Let me also note that old versions containing the UltraWebGrid are no longer supported and we will not be able to help with further issues. I suggest that you consider upgrading your application to newer versions. More information on our product lifecycle policy can be found at http://ko.infragistics.com/support/product-lifecycle
Hristo,
I already tried that, it works fine as far as the label display goes, but the paging gets impacted if I put it inside a UpdatePanel. The whole reason for keeping the grid with loadondemand=xml was for the paging as we have grid containing large number of rows.
If I change loadondemand to automatic or notset, and put the grid inside an UpdatePanel(or WebAsyncRefreshPanel, tried both) , then the page numbers get displayed at the side but selecting any page number shows the first page only. To fix this, I saw some mentions of handling the PageIndexChanged event , so I added that as
protected void ContractsGrid_OnPageIndexChange(object sender, Infragistics.WebUI.UltraWebGrid.PageEventArgs e) { ContractsGrid.DisplayLayout.Pager.CurrentPageIndex = e.NewPageIndex; ContractsGrid.DataSource = cds.DefaultView; ContractsGrid.DataBind(); }
Though this does work, its extremely slow, as I believe it is trying to load the entire data again, whereas when it was loadondemand=xml, the page change was getting records instantly without any delay. Also filtering is not working properly.
So basically, if I keep loadondemand=xml, then label does not show, if I change that and put in UpdatePanel, then paging is having issue with speed.
Is there no function or event on client or server side that I can use after the grid is refreshed which can cause the label to display while still keeping loadondemand =xml so that I don't lose the paging and filtering ?
I am not sure on why placing the grid inside the UpdatePanel brings issue with the paging. Another approach is to leave the grid outside the UpdatePanel, and set the grid as a trigger for the panel:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers> <asp:AsyncPostBackTrigger ControlID="UltraWebGridID" /> </Triggers>
Please let me know if this works for you.