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
close icon

loading a griddataboundgrid from xml

Hi,
Can you point me to a sample or some lines of code for loading a grid from a dataset?
I've got something like the following started but I've not been able to see the data (I checked the row count just to be sure). Is some binding method needed?

Thanks,
Dimitri

this.ds = new DataSet();
this.ds.ReadXml("MyXML.xml");
int test = this.ds.Tables["Product"].Rows.Count;
this.productGrid.DataSource = ds;
this.productGrid.DataMember = ds.Tables["Table1"].TableName;
this.myContainer.Controls.Add(productGrid);




3 Replies

AD Administrator Syncfusion Team December 1, 2006 05:04 AM UTC

Hi Dimitri,

Please try the attached sample and let me know if you are trying something different.
GDBGTOXML.zip

Best Regards,
Haneef


AD Administrator Syncfusion Team December 1, 2006 07:22 PM UTC

Thanks Haneef,
I was able to do this yesterday - however, how do I control which columns get the data?
If I do:

this.myGrid.GridBoundColumns.Add(colName);

The data that I added from xml is gone. I want to add extra columns and or control which columns I load, where I can show check boxes for selecting the data I loaded from XML, or dropdowns etc. and add event handlers from there (just as an example)

Thanks,
Dimitri



>Hi Dimitri,

Please try the attached sample and let me know if you are trying something different.
GDBGTOXML.zip

Best Regards,
Haneef


AD Administrator Syncfusion Team December 4, 2006 11:48 AM UTC

Hi Dimitri,

Please refer to the below forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=51105

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon