I use VS 2005 with framework 2.0, I have a webhierarchicaldatagrid, i bind data programmatically with it by using following code, Dim dvParent As Infragistics.Web.UI.DataSourceControls.DataView Dim dvChild As Infragistics.Web.UI.DataSourceControls.DataView Dim tOrders As DataTable = New DataTable("Orders") Dim tOrder_details As DataTable = New DataTable("Order_details") tOrders.Columns.Add("Name", GetType(String)) tOrders.Columns.Add("StartDate", GetType(Date)) tOrders.Columns.Add("EndDate", GetType(Date)) tOrders.Columns.Add("ClassID", GetType(String)) tOrders.Columns.Add("ID", GetType(String)) tOrder_details.Columns.Add("Name", GetType(String)) tOrder_details.Columns.Add("StartDate", GetType(Date)) tOrder_details.Columns.Add("EndDate", GetType(Date)) tOrder_details.Columns.Add("ClassID", GetType(String)) tOrder_details.Columns.Add("ID", GetType(String)) For Each eRow As DataRow In CurrentEnrollments.DS.Tables("ClassEnrollment").Rows Dim tmpRow As DataRow tmpRow = tOrders.NewRow() tmpRow.Item("Name") = eRow.Item("Name") tmpRow.Item("StartDate") = eRow.Item("StartDate") tmpRow.Item("EndDate") = eRow.Item("EndDate") tmpRow.Item("ClassID") = eRow.Item("ClassID") tmpRow.Item("Id") = eRow.Item("ID") tOrders.Rows.Add(tmpRow) Next For Each eRow As DataRow In CurrentEnrollments.DS.Tables("LEIEnrollment").Rows Dim tmpRow As DataRow tmpRow = tOrder_details.NewRow() tmpRow.Item("Name") = eRow.Item("Name") tmpRow.Item("StartDate") = eRow.Item("StartDate") tmpRow.Item("EndDate") = eRow.Item("EndDate") tmpRow.Item("ClassID") = eRow.Item("ClassID") tmpRow.Item("Id") = eRow.Item("ID") tOrder_details.Rows.Add(tmpRow) Next 'tOrders = CurrentEnrollments.DS.Tables("ClassEnrollment") 'tOrder_details = CurrentEnrollments.DS.Tables("LEIEnrollment") Dim hdsMain As New Infragistics.Web.UI.DataSourceControls.WebHierarchicalDataSource() dvParent = New Infragistics.Web.UI.DataSourceControls.DataView() dvParent.ID = "PARENT" dvParent.DataSource = tOrders dvChild = New Infragistics.Web.UI.DataSourceControls.DataView() dvChild.ID = "CHILD" dvChild.DataSource = tOrder_details hdsMain.DataViews.Add(dvParent) hdsMain.DataViews.Add(dvChild) Dim drMain As New Infragistics.Web.UI.DataSourceControls.DataRelation() drMain.ParentDataViewID = "PARENT" drMain.ChildDataViewID = "CHILD" drMain.ParentColumns = New String() {"ClassID"} drMain.ChildColumns = New String() {"ClassID"} hdsMain.DataRelations.Add(drMain) WebHierarchicalDataGrid1.DataSource = hdsMain WebHierarchicalDataGrid1.DataMember = hdsMain.DataViews.FindByID("PARENT").ID WebHierarchicalDataGrid1.DataKeyFields = "ClassID" WebHierarchicalDataGrid1.ID = "webgrid"While running page grid load successfully and shows parent data, but when i try to expand row then its cause javascritp error as 'Sys' is undefined' and 'Object expected'. I use script manager at my master page.
On Same page if i use another WHDataGrid and bind it using templet columns(in desing view), its work fine. Any one help me abt this,
Thakning You.
Hello Bhadresh,
Thank you for your reply, its work with set set InitialDataBindDepth="-1".
Thanks again
Hello cmm,
In order to look in to this provide me with the version of NetAdvantage product you are using with service release used if any. I would also recommend you to check relation between your data tables and set InitialDataBindDepth="-1" for WebHierarchicalDataGrid.