We are using Net Advantage 2011.2. We have a button click event where we pull webhierarchical grid data into it to save it based on functionality. However we are not getting webhierarchical grid data as expected. We are binding data from codebehind.
protected Sub btn_clickEvent(ByVal Sender as Object, ByVal e as EventArgs) handles btn.ClickEvent
Dim testGrid as Infragistics.Web.UI.GridControls.WebHeirarchicalGrid
testgrid = Me.GridFromUI
End Sub
In the above example we are not getting GridFromUI grid values. Please provide us a way to use data from Grid on a button click event
Hello Katti,
Here is a sample of how you could enumerate through child rows:
I am also attaching a sample.
Please have in mind that you have access to the records which are already data bound. I set InitialDataBindDepth="1"so I could have access to all child records. If you haven't loaded any of your child records and you still want to enumerate all of them, please query the DataSource directly because otherwise you might experience performance issues.
Let me know if you need further assistance.
Hi Tihomir Iliev,
Thank you its working as expected. But we are unable to get child rows of band(0). For parent rows we used Grid.Rows but we need to get rows of child band or any way to enumerate through child rows .
Please guide us in it
Hello Avinash,
If you want to have your columns enumeration filled in, you should add the columns either declaratively or using the code-behind. Please take a look at this article http://help.infragistics.com/Doc/ASPNET/2015.2/CLR4.0/?page=WebHierarchicalDataGrid_Data_Binding.html. There you could see how to declare the columns in the aspx or from the code-behind.
If you do not want to declare the columns, in your case you could get the columns count directly from the grid's datasource.
Please let me know if you need anything else.
Hi,
We have attached source code please go through it. We have to update WebHeirarchicalGrid fropm client side and need to save those data in a databbase on button click, however we are getting an empty grid on button click. Please guide us in it.
Hello Praveen,
I do not find any .cs files in your sample application. Please provide them so I could further investigate.