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

ComboBox not listing the Values

Hi Clay, I''m using GDBG Grid.. Here I''m having Column which is of type ComboBox.. I''ve used ArrayList as the Datasource for the DropDown for that partcular column. When I Click on the Drop button to see the Values listed in the Combo, it is not showing the DropDown, instead when I keep on clicking the Cell, the values in the cell is changing one by one.The same is happening for DatePicker cells too. It is showing the buttons, but when I click on it, nothing is getting listed. I''m very much sure that I''ve missed out something. But cudn''t able to guess the thing. Badly in need of your help.. Thiyagu.

10 Replies

AD Administrator Syncfusion Team October 11, 2004 10:11 AM UTC

Are you handling the CurrentCellShowingDrop event for some reason. If this gets cancelled, the dropdown will not show. Have you set style.Enabled = False for any of these cells. This would prevent the cell from becoming the current cell. For your ArrayList datasource, is it an arraylist of objects that have public properties? Have you used one of these public properties for it style.DisplayMember setting? If you can post a sample showing the problem, we can try to spot what might be going wrong.


TH Thiyagu October 11, 2004 10:31 AM UTC

As I''m involved increating Usercontrols which will be plugged in to the main application, I cannot send the sample. Futher, I''m using non-conventional Database. But the samee thing workes perfect for my previuos screens.. I''ve checked all your points in my code. But nothing seems to be working... Thiagu.


AD Administrator Syncfusion Team October 11, 2004 11:18 AM UTC

Have you compared your code with the code in our grid\Samples\CellTypes\Comboboxes? That sample shows various ways of using comboboxes. Does that sample work for you? If you can post the code you are using to try to set up the combobox, I can see if I see anything strange. But, I expect debuggng a working sample will be the quickest way to resolve the problem. If you have our source code version, you can use the assembly manager to produce a debug build of our libraries, and then try to step into our code to see what might be causing the dowpdown not to show.


TH Thiyagu October 12, 2004 01:16 AM UTC

PLz find the code below which I''m using in my screen... this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[2].StyleInfo.CellType = "ComboBox"; this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[2].StyleInfo.DataSource = str; this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[2].StyleInfo.DropDownStyle = GridDropDownStyle.Exclusive; this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[4].StyleInfo.CellType = "ComboBox"; this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[4].StyleInfo.DataSource = str; this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[4].StyleInfo.DropDownStyle = GridDropDownStyle.Editable; Thiagu.


AD Administrator Syncfusion Team October 12, 2004 05:01 AM UTC

What is str? I assume it is an ArrayList of objects with public properties like the ArrayList USStates in the Grid\Samples\Quick Start\CellTypes sample. Where are you setting this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[2].StyleInfo.DisplayMember and this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[2].StyleInfo.ValueMember?


TH Thiyagu October 12, 2004 05:09 AM UTC

I don have Value member and Display member. I''m juz binding list of ID''s which is of type string.. And yes, str is an Array List.


AD Administrator Syncfusion Team October 12, 2004 05:16 AM UTC

It will not work unless ArrayList has object that have public properties, and you set DisplayMember and ValueMember appropropriately. This is what is required to use the style.DataSource property. If you just want to have a list of strings, then do not use the style.DataSource property. Instead, use the style.ChoiceList property and set it to a StringCollection object holding your strings. Do not an ArrayList in this case.


TH Thiyagu October 12, 2004 05:37 AM UTC

I was able to findout the problem.. I''m having a Column which has got RadioButton(Yes/No) cell type. When I remove that code, I was able to see the Drop down showing the list. Plz find the Code below for the Radio buttons which I had written. //Radio Button-SwithPermission Column GridStyleInfo style = this.ecnMappingGridDataBoundGrid_.Binder.InternalColumns[6].StyleInfo; style.CellType = "RadioButton"; style.ChoiceList = new StringCollection(); style.ChoiceList.Add("Yes"); style.ChoiceList.Add("No"); style.TextAlign = GridTextAlign.Default; Is there any problem in the above code..As soon I remove the above set of lines, I was able to see the Dropdown List.. Thanks in Advance, Thiagu.


AD Administrator Syncfusion Team October 12, 2004 06:29 AM UTC

This is a bug in our radio button code. We will have to fix it. If you want a private build with the fix, you can submit a direct trac support incident requesting it and we will send you download instructions when it becomes available.


TH Thiyagu October 12, 2004 07:52 AM UTC

Thanx Clay.. But I''ve changed Radio button to CheckBox.. Thiagu.

Loader.
Live Chat Icon For mobile
Up arrow icon