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

Can I use a combobox in the gridgroupingcontrol?

Hi, I''m using the groupedgridcontrol 2.0.5.0. Could someone please tell me if I can have a combobox for a cell, linked to an IList? Thanks very much in advance, Damien

8 Replies

AD Administrator Syncfusion Team July 25, 2005 06:17 AM UTC

You can set the DisplayMember/ValueMember/DataSource property for the column''s style. this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.CellType = "ComboBox"; this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.DataSource = someDataList; this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.DisplayMember = "displayCol"; this.gridGroupingControl1.TableDescriptor.Columns["Col"].Appearance.AnyRecordFieldCell.ValueMember = "valueCol";


JL Jessy Liu July 26, 2005 09:02 AM UTC

Hi Clay, Where can I see what the possible string values are for CellType? I would like to have a DateTimePicker but would like to set this manually so possibly in Appearance.AnyRecordFieldCell.CellType Thanks!


AD Administrator Syncfusion Team July 26, 2005 10:19 AM UTC

You can see the celltypes in a dropdown if you open any Appearance.XXXXX.CellType property in the designer. You can also see a list if you look for CellType in the Help Index for Essential Grid. If you just want to set the Date, you can use the "MonthCalendar" CellType. If you want to set the time as well, then you woul dhave to add your own celltype. Here is a KB that has the code you would need. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=35


JL Jessy Liu July 26, 2005 05:08 PM UTC

Hi Clay, The example you posted uses a GridControl and I see you can use GridControl.CellModels.Add to add the custom model. However, I can''t see the equivalent for the GridGroupingControl. There is a .Appearance.XXXX.CellModel but this is read-only and wouldn''t enable me to give the model a name to be used in .CellType anyway. Please can you point me in the right direction. Thanks!


JL Jessy Liu July 26, 2005 05:08 PM UTC

Hi Clay, The example you posted uses a GridControl and I see you can use GridControl.CellModels.Add to add the custom model. However, I can''t see the equivalent for the GridGroupingControl. There is a .Appearance.XXXX.CellModel but this is read-only and wouldn''t enable me to give the model a name to be used in .CellType anyway. Please can you point me in the right direction. Thanks!


AD Administrator Syncfusion Team July 26, 2005 05:42 PM UTC

You use the this.gridGroupingControl1.TableModel.CellModels collection. See this sample. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\CustomCellTypes


JL Jessy Liu July 27, 2005 08:31 AM UTC

Hi Clay, I''m on 2.1.0.9. Is there an equivalent example? Thanks.


AD Administrator Syncfusion Team July 27, 2005 08:42 AM UTC

Here is a copy of the 3210 sample that I was able to build with 2051. I think it should build OK with 2109 too. http://www.syncfusion.com/Support/user/uploads/CustomCellTypes_a6159f38.zip

Loader.
Live Chat Icon For mobile
Up arrow icon