We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problem with Syncfusion Grid Grouping Control

1) I m having a tree view and a datagrid. My task is to fill datagrid as per the item selected in tree view. 2)After assinging datasource to datgrid, I am setting width of columns as per table fetched from dataset. 3) It works perfect with very first table, but when the dataset again gets filled with another table having different numbers of columns it gives error "System.ArgumentOutOfRangeException at "Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor.get_Item(Int32 index)"" 4)If all the tables fetched by dataset contain same number of columns, it display tables in grid, with first column values are proper and rest of the column are empty… Code Snippet ''''''''Get Table as Per Selected Tree Node Mydataset = MyClass.GetDataSetFromStoredProcedure(MyCommandString) Mydatagrid.DataSource = Mydataset.Tables(0).DefaultView ''''''''Set The width of the Columns per Datagrid Width For intColumns = 0 To Mydataset.Tables(0).Columns.Count - 1 ''''''''Giving Error On this Line Mydatagrid.TableDescriptor.Columns(intColumns).Width = Mydatagrid.Width / Mydataset.Tables(0).Columns.Count Next intColumns

Loader.
Live Chat Icon For mobile
Up arrow icon