Serious delay using a Infragistics Event Handler!
I have a web page where I'm using an Infragistics UltraWebGrid Control. I've created an event handler (see code below). The reason I'm using this code-behind code is because I can't get javascript to update the grid cell correctly. We've tried everything under the sun here except for the right solution...Duh! Anyway, when the event fires, it literally takes at least 2 seconds before the cell updates. It does update and it updates successfully but the response time is terrible. Anyone have any ideas why this might be happening. A couple of programmers think it has to do with AJAX.
Code:
Private Sub UG_MarketStatis_UpdateCell(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.CellEventArgs) Handles UG_MarketStatis.UpdateCell
If e.Cell.Key = "Market_Data_Amt" Then
If e.Cell.Row.Index = 0 Then
e.Cell.Value = FormatPercent(CDbl(e.Cell.Text) / 100, 0)
Else
e.Cell.Value = FormatCurrency(CDbl(e.Cell.Value), 0)
End If
End If
End Sub
Re: Serious delay using a Infragistics Event Handler!
Is the grid in an UpdatePanel? For the UpdateCell method to be called the page has to postback to the server, and that can take seconds indeed. Usually you would see this happening (you can see the page reloading as if you refreshed it) but if the grid is in an update panel only the grid will postback and the rest of the page won't, which you won't be able to see very easily. The idea is that posting back only the contents of the update panel is much less work (and takes less time) then posting back the entire page. Unfortunately, for a grid, especially the very complex infragistics grids, it still takes a long time.
That's the only reason I can think of; for any more help you might want to post in the ASP.NET forum and give some more information, like the html of the page for instance.
Re: Serious delay using a Infragistics Event Handler!
Nick,
The code is not in an UpdatePanel. I don't think that would make much of a difference though. I can actually click the Submit button for the entire page and the response is quicker than just updating a single cell in the grid. I'm wondering if their isn't a better Event Handler I should use.
Thanks,