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

Multi-Selection ComboBox CellType in my virtual grid control.

I am looking for a multi-selection ComboBox celltype in my virtual grid control. The Multi-Selection CombBox dropdown list will show a checkbox for each item, user can click the checkboxes to choose the items. The selected items will be displayed in the cell and seperated by coma. Is there a way to create such a celltype?

6 Replies

AD Administrator Syncfusion Team July 6, 2004 01:26 PM UTC

We ship two samples showing this in th e2.0 code base. One uses a Modal dropdown form, and the other uses a modaless popup. Grid\Samples\In Depth\DropDownFormAndUserControlSample


DL Dongxian Li July 6, 2004 02:39 PM UTC

Thanks. The modeless form one is what I am looking for. But it has two problems: (1). User has to click Ok button to save the changes. If user just selects some checkboxes and clicks the ComboBox button to close the dropdown window, the changes are not relfected in the cell value. (2)User has to click two times to change a checkbox state: First click will select the item, the second click will change the checkbox state. I am looking for a celltype that looks and works exactly like a ComboBox except that each item has a checkbox. One example is the celltype used to change the ControllerOptions of the GridControl in the Properties Editor in VisualStudio .Net Designer. It looks just like a ComboBox but each item has a checkbox. Can we do that?


AD Administrator Syncfusion Team July 6, 2004 03:07 PM UTC

The code is there so you can try to modify the code to do these things that you want done. 1) Whether a CheckedList reacts to a first click is a property of the CheckedListBox. this.checkedListBox1.CheckOnClick = true; 2) if you want to save any changes no matter how the dropdown closes, then in DropDownContainerCloseDropDown, you can just call OnSaveChanges.


DL Dongxian Li July 6, 2004 04:55 PM UTC

Thanks for the help. I changed the code and it works as I want. Some more questions on suggestion 2: (1). If I still want to set the PopupCloseType to PopupCloseType.Done after the Ok and Cancel buttons are removed from the form, Where can I do that? (2). I am using the celltype in a virtual grid, can I save the text in SaveCellInfo event handler just as other celltype? >The code is there so you can try to modify the code to do these things that you want done. > >1) Whether a CheckedList reacts to a first click is a property of the CheckedListBox. > > this.checkedListBox1.CheckOnClick = true; > > >2) if you want to save any changes no matter how the dropdown closes, then in DropDownContainerCloseDropDown, you can just call OnSaveChanges.


AD Administrator Syncfusion Team July 6, 2004 05:29 PM UTC

1) I do not know of any event you can place can fire the UserControlSave event since there is no action within the UserControl that triggers a save. If you want to allow a cancel, you could catch whatever action you will use to trigger teh cancel (maybe pressing esc key), and in that action fire the UserControlCancel event. Then you would assume you want to save unless you get a cancel event fired. 2) Yes. If the renderer saves OK in OnSaveChanges, SaveCellInfo should be hit. It seems to be hit in the sample.


DL Dongxian Li July 6, 2004 06:03 PM UTC

Thank you very much for your prompt support. I really appreciate it. dongxian

Loader.
Up arrow icon