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

Unbound column in GGC

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


1 Reply

JJ Jisha Joy Syncfusion Team March 6, 2009 09:39 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon