Hi,
In my project, I need to do somethings from server side when value of a cell has been changed.
So what is the event I should use for this situation? I could not find event like CellValueChanged in DataGridView from Microsoft.
Thanks
I've used UpdateCell() function for this situation. But I got a problem.
When i set LoadOnDemand=Xml, An Error has occured when I change value of cell
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.WebUI.UltraWebGrid.UltraWebGrid.RaiseCallbackEventHandler(String eventArgument) +9605 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.LoadPostData(String postDataKey, NameValueCollection values) +1285 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +693 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743Could you help me on this issue?Thanks
[NullReferenceException: Object reference not set to an instance of an object.]
Infragistics.WebUI.UltraWebGrid.UltraWebGrid.RaiseCallbackEventHandler(String eventArgument) +9605
Infragistics.WebUI.UltraWebGrid.UltraWebGrid.LoadPostData(String postDataKey, NameValueCollection
values) +1285
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +693
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint
) +1743Could you help me on this issue?Thanks
Hello,
I would suggest check whether the browser property of the grid is set to XML (Browser=XML).
When you use Load on Demand you need also to handle InitializeDataSource event in order to provide data source.
More information how to setup the grid to use Load on Demand you can reference the link below:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/WebGrid_Using_XML_Load_On_Demand.html
In order to use UpdateCell, UpdateRow events you need to use Load on Demand settings of the grid.
Thanks for your response.
I've tried that tutorial but id did not work out.
Here is my code behind:
protected void UltraWebGrid1_UpdateCell(object sender, Infragistics.WebUI.UltraWebGrid.CellEventArgs e) { try { int v_height = (int)UltraWebGrid1.Height.Value; } catch (Exception ex) { throw ex; } } protected void UltraWebGrid1_InitializeDataSource(object sender, Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs e) { UltraWebGrid1.DataSource = SqlDataSource1; } protected void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e) { UltraWebGrid1.Bands[0].DataKeyField = "ItemCode"; }
and I've also set browser=Xml; LoadOnDemand="XML" and viewtype="Hierarchical"
And I got this error when I edit a cell
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.WebUI.UltraWebGrid.UltraWebGrid.RaiseCallbackEventHandler(String eventArgument) +9605 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.LoadPostData(String postDataKey, NameValueCollection values) +1285 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +346 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743And another thing, when I debug the program, it did not go to InitializeDataSource function?Could you help me?
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +346
) +1743And another thing, when I debug the program, it did not go to InitializeDataSource function?Could you help me?
We need to check this issue.
I apologize for the delayed response.
This behavior sounds like an issue. Please could you submit a support request. This behavior needs to be investigate further.