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

loading a griddataboundgrid from xml

Thread ID:

Created:

Updated:

Platform:

Replies:

52598 Nov 30,2006 03:08 PM Dec 4,2006 06:48 AM Windows Forms 3
loading
Tags: GridControl
Dimitri Kutuzov
Asked On November 30, 2006 03:08 PM

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);




Administrator [Syncfusion]
Replied On December 1, 2006 12:04 AM

Hi Dimitri,

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

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On December 1, 2006 02:22 PM

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

Administrator [Syncfusion]
Replied On December 4, 2006 06:48 AM

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

CONFIRMATION

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.

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.

;