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.

Grid Combobox issue

Thread ID:

Created:

Updated:

Platform:

Replies:

62381 Jun 13,2007 05:41 PM Jun 17,2007 02:53 PM Windows Forms 2
loading
Tags: Grouping
Rocky Tatlay
Asked On June 13, 2007 05:41 PM

Hello,

I’m having an issue when I initialize my data grid. I use a datable to populate the combo box in the grid. The problem is that when I click on the dropdown arrow on the combo box, the items from the datable are not displayed. The table does have values and it seems to bind to the combox box correctly but the values are not there. Below is how i initialize the combo box:

td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.CellType = "ComboBox";

td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.ShowCurrentCell;

td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.DataSource = ieDS.Tables["Store"];

td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.DisplayMember = "STORE_COL_NUMB";

td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.ValueMember = "STORE_COL_NUMB";

td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.DropDownStyle = GridDropDownStyle.AutoComplete;

td.Columns[InvErrConstants.HDR_STORE_NBR].Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Left;

Rajagopal [Syncfusion]
Replied On June 13, 2007 08:33 PM

Hi Rocko,

I am not able to reproduce this problem in the below sample that uses the same property settings that you have used for combobox setup in the GridGroupingControl.

Here is the sample download link
http://websamples.syncfusion.com/samples/Grid.Windows/F62381/main.htm

Are you seeing any issues with the above sample? Let me know if this helps.

Thanks for using Syncfusion Products.
Have a nice time.

Regards,
Rajagopal

Rocky Tatlay
Replied On June 17, 2007 02:53 PM

I have a work around for the problem. Essentially I’m copying the table from the dataset into an data table which I create, then copy over the data and bind it to the combo box(example below). It's obvious that there is a setting in my original dataset that’s not allowing the binding to happen. Any ideas what may cause this in my dataset?

DataTable tempStore = ieDS.Tables["store"].Clone();
tempStore = ieDS.Tables["store"].Copy();

td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.CellType = "ComboBox";
td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.ShowCurrentCell;
td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.DataSource = tempStore;
td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.DisplayMember = InvErrConstants.STORE_COL_NUMB;
td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.ValueMember = InvErrConstants.STORE_COL_NUMB;
td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.DropDownStyle = GridDropDownStyle.AutoComplete;
td.Columns["STORE_NBR"].Appearance.AnyRecordFieldCell.HorizontalAlignment = GridHorizontalAlignment.Left;

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.

;