Grid Combobox issue
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;
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;
SIGN IN To post a reply.
2 Replies
RA
Rajagopal
Syncfusion Team
June 14, 2007 12:33 AM UTC
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
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
RT
Rocky Tatlay
June 17, 2007 06:53 PM UTC
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;
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;
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
-
RT Rocky Tatlay
- Jun 13, 2007 09:41 PM UTC
- Jun 17, 2007 06:53 PM UTC