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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Trouble sizing datagrid columns

Thread ID:





10675 Feb 9,2004 09:47 PM UTC Feb 10,2004 09:56 AM UTC WinForms 1
Tags: FAQ
Eddie Merrifield
Asked On February 9, 2004 09:47 PM UTC

Hi, 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) ds.ReadXml(xmlRdr, XmlReadMode.InferSchema) 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. Any Ideas? Thanks Eddie

Administrator [Syncfusion]
Replied On February 10, 2004 09:56 AM UTC

001 Hi! 002 Select List! 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon