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.

combobox column not show blank when first load

Thread ID:

Created:

Updated:

Platform:

Replies:

76104 Aug 22,2008 06:15 AM Sep 1,2008 07:41 AM Windows Forms 1
loading
Tags: GridControl
Sean Schoeman
Asked On August 22, 2008 06:15 AM

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


Nirmal Raja [Syncfusion]
Replied On September 1, 2008 07:41 AM

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



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.

;