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.
Syncfusion Feedback

populating table with grid values

Thread ID:

Created:

Updated:

Platform:

Replies:

10555 Feb 5,2004 09:15 AM Feb 5,2004 10:19 AM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 5, 2004 09:15 AM

Hi, I have a grid that writes to an xml file. Before the user saves the grid to the file I need to populate some records in a table that is part of the schema, but not part of the grid. Basically I need to select the contents of one table and use those values to populate this other table. Do you have an example of a statement of this type? Thanks, CB

Administrator [Syncfusion]
Replied On February 5, 2004 09:38 AM

I do not have a sample for this,a dn am not sure what role the grid would play in this task. Maybe you could loop through code like this: gridDataTable.Rows[someRowPos][someColPos] = secondDataTable.Rows[someOtherRowPos][someOtherColPos]; I am not sure how you want to determine the row and col positions for use with each assignment.

Administrator [Syncfusion]
Replied On February 5, 2004 09:55 AM

Hi, I guess what I''m asking is, can I access the tables directly in the datasource when the user is finished editing the grid and add data to one of those tables. I would like to avoid using the grid at all and just use regular sql as in: ''Update table1 set table1.field1 = table2.field1 where table1.field2 = table2.field2'' - or something like that. If this is possible do you know what the syntax would be for accessing the tables in the datasource and running a query of this type? Thanks >I do not have a sample for this,a dn am not sure what role the grid would play in this task. > >Maybe you could loop through code like this: > >gridDataTable.Rows[someRowPos][someColPos] = secondDataTable.Rows[someOtherRowPos][someOtherColPos]; > >I am not sure how you want to determine the row and col positions for use with each assignment.

Administrator [Syncfusion]
Replied On February 5, 2004 10:19 AM

I do not know how you might do this using a SqlCommand or something like it. It probably is possible, but it is not something I have attempted. If the DataSource object is a System.Data.DataTable, then you should be able to use any valid operations on that object.

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.

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

;