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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

persisting view in GDBG and GGC

Thread ID:





52872 Dec 5,2006 03:31 PM UTC Dec 11,2006 01:11 PM UTC WinForms 3
Tags: GridControl
Dimitri Kutuzov
Asked On December 5, 2006 03:31 PM UTC

I'm loading data into grids from an xml file. I'm alternatively setting the data source to different tables in the DataSet. How do I keep the data I've retrieved from on data source still in view and add to it data from another data source (same table structure)? I want to build up a 'union' of values pulled from separate tables.


Administrator [Syncfusion]
Replied On December 6, 2006 04:40 AM UTC

Hi Dimitri,

This can be acheived by adding GridBoundColumns for the columns that you want to see from either table to the grid. Then make one table the grid’s datasource and use grid.Model.QueryCellInfo to dynamically provide the values from the other table. If you want to handle editing, you would also have to handle SaveCellInfo. Please refer to tha attached sample for implementation.

Here is the link for the sample:

Best Regards,

Administrator [Syncfusion]
Replied On December 8, 2006 08:47 PM UTC

Okay, thanks Haneef,
Actually, the word I should have used is 'append' data from a different table to the live column on display. Does you sample show this?

Administrator [Syncfusion]
Replied On December 11, 2006 01:11 PM UTC

Hi Dimitri,

You can handle the QueryCellInfo event to provide values to the grid andalso handle the SaveCellInfo to store any changed values to underlying datasource from the grid. Please refer to the attached sample for more details.

private void Model_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
if(e.ColIndex > 0 && e.RowIndex > 0)
GridModel model = sender as GridModel;
if( e.RowIndex > model.RowCount /2 )
e.Style.CellValue = table1.Rows[e.RowIndex -3 ][e.ColIndex -1];
e.Style.CellValue = table2.Rows[e.RowIndex - 1 ][e.ColIndex -1];
e.Handled = true;

Here is a sample.

Best Regards,


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