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

change Table.Engine.SourceListSet in event QueryCellStyleInfo

I want to update the datasource of a GridListControl (which is in a column of a grouping grid) in the event QueryCellStyleInfo.
This is the code below :

e.TableCellIdentity.Table.Engine.SourceListSet[stat.Code].List = selectStatus.ToList();
e.TableCellIdentity.Table.TableDescriptor.Relations[0].Name = "Name";
e.TableCellIdentity.Table.TableDescriptor.Relations[0].MappingName = "Code";
e.TableCellIdentity.Table.TableDescriptor.Relations[0].ChildTableName = stat.Code;

This code doesn't work. I can't update my list in the event QueryCellStyleInfo. Why ??

Adrien Falconnet.

2 Replies

AF Adrien Falconnet September 30, 2009 03:36 PM UTC

Excuse-me, it's the wrong part to post. It's in Wins Forms.


LS Lingaraj S Syncfusion Team October 1, 2009 03:02 PM UTC

Hi Adrien,

Thank you for your interest in Syncfusion products.

The DaatSource, DispalyMember and ValueMember properties are required to create GridListControl cell column in GridGroupingControl as shown below:

********** C# CODE ********
this.gridGroupingControl1.TableDescriptor.Columns["Name"].Appearance.AnyRecordFieldCell.CellType = "GridListControl";
this.gridGroupingControl1.TableDescriptor.Columns["Name"].Appearance.AnyRecordFieldCell.DataSource = GetTable();
this.gridGroupingControl1.TableDescriptor.Columns["Name"].Appearance.AnyRecordFieldCell.DisplayMember = "Name";
this.gridGroupingControl1.TableDescriptor.Columns["Name"].Appearance.AnyRecordFieldCell.ValueMember = "ID";
********** VB CODE *********
Me.gridGroupingControl1.TableDescriptor.Columns("Name").Appearance.AnyRecordFieldCell.CellType = "GridListControl"
Me.gridGroupingControl1.TableDescriptor.Columns("Name").Appearance.AnyRecordFieldCell.DataSource = GetTable()
Me.gridGroupingControl1.TableDescriptor.Columns("Name").Appearance.AnyRecordFieldCell.DisplayMember = "Name"
Me.gridGroupingControl1.TableDescriptor.Columns("Name").Appearance.AnyRecordFieldCell.ValueMember = "ID"


Refer the sample from below link:
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/GridListControlColumn.zip

Please let me know if you have any queries.

Regards,.
Lingaraj S.

Loader.
Live Chat Icon For mobile
Up arrow icon