combobox column not show blank when first load

Hi

I am assigning the datasource to a combobox column at runtime, when the grid loads the combobox column shows all blanks, but you can still access the correct values from the cell.

After i select the value from the combobox it populates the grid correctly.

I basicly just want the combobox column to show the display member of the first item in the combobox once the datasource has been assigned.



I am using version 6.3.0.30

here is the code i use for the combobox column:

objbc = New Syncfusion.Windows.Forms.Grid.Grouping.GridColumnDescriptor

objbc.Appearance.AnyRecordFieldCell.CellType = "ComboBox"
objbc.Appearance.AnyRecordFieldCell.DisplayMember = "sTemplateName"
objbc.Appearance.AnyRecordFieldCell.ValueMember = "sFormula"
objbc.Appearance.AnyRecordFieldCell.DropDownStyle = Syncfusion.Windows.Forms.Grid.GridDropDownStyle.Exclusive
objbc.Appearance.AnyRecordFieldCell.ShowButtons = Syncfusion.Windows.Forms.Grid.GridShowButtons.ShowCurrentCell
objbc.Appearance.AnyRecordFieldCell.DataSource = dt

Any help would be appreciated.
Thanks


1 Reply

NR Nirmal Raja Syncfusion Team September 1, 2008 11:41 AM UTC

Hi Sean,

Thank you for your interest in Syncfusion product.

The CellType of the cells in a column can be assigned, depending upon the range of the cell, is acheived through GridGroupingControl's QueryCellStyleInfo event.
And the display member can be assigned as soon as the DataSource is loaded, this can be attained using CellValue property of the Style object in the QueryCellStyleInfo event.

Please refer the following sample for futher details:
CellTypeSample

Let me know if you have any queries.

Regards,
Nirmal



Loader.
Up arrow icon