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.

Unbound column in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

79990 Mar 6,2009 01:07 AM Mar 6,2009 04:39 AM Windows Forms 1
loading
Tags: GridControl
David Cui
Asked On March 6, 2009 01:07 AM

in GridControl we have 4 basic queryCellInfo and saveCellInfo ...

can i do partial virtual mode in GGC ? in another word, make several unbound column (i believe it can). what is the best practice ? which event(s) i need to handle ...

any example will be great !
david


Jisha Joy [Syncfusion]
Replied On March 6, 2009 04:39 AM

Hi David,

To add a column which is not bound to the datasource, you need to add the column as an unbound column.

To add an unbound column see the following code,



this.gridGroupingControl1.TableDescriptor.UnboundFields.Add("print");



Then to provide values to the bounded column by handling the QueryValue event. Please see the code:


this.gridGroupingControl1.TableDescriptor.QueryValue += new FieldValueEventHandler

(unboundField_QueryValue);

private void unboundField_QueryValue(object sender, FieldValueEventArgs e)
{
int RecordIndex

=this.gridGroupingControl1.Table.PrimaryKeySortedRecords.IndexOf(e.Record);
if (e.Field.Name == "print" && RecordIndex>=0)
{

e.Value= "value";
}
}

Please let me know if this helps.

Regards,
Jisha


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.

;