When using your AutoSizeTable code, the sample works great.....UNTIL I try to use the following code to fill my dataset:
Dim ds As DataSet = New DataSet()
Dim nSR As StringReader = New StringReader(sxml)
Dim xmlRdr As System.Xml.XmlTextReader = New System.Xml.XmlTextReader(nSR)
Dim myTable As New DataTable()
myTable = ds.Tables("XXXXX")
dataGrid1.DataSource = myTable
This code is designed to take an XML string, and convert it to a dataset. Then load that dataset into the grid.
When using this code to load the dataset, I get an error at the following line:
dataGrid1.TableStyles("customers").GridColumnStyles(col).Width = CType(width, Integer)
The error indicates that there are no GridColumnStyles in the collection.
ADAdministrator Syncfusion Team February 10, 2004 09:56 AM UTC
In this case status_details is the table name and code and description are columns, check whether your xml file format is in correct format, make a dummy xml with the above descriptions and try to add it in the dataset, if it work then there is some format mistake in your xml file.