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

How to have multi-selection cell?

I want to have a cell in which if clicked, a drop down combobox or menu will allow the user to make 1 to n selections. I have tried displaying a form when the cell is clicked but the problem is when you display a form or control, it stays in the same place while the user could be scrolling the grid or moving the parent window around. See example attached for the problems with a custom form or control. I need a syncfusion managed cell that allows me to have multi-selection. Any ideas? forum_6587_5319.zip

4 Replies

AD Administrator Syncfusion Team May 25, 2004 07:19 PM UTC

In 2.0.5.1, we ship a sample that shows how you can drop a form or a usercontrol from a cell. The sample we use is to drop a check listbox control. Maybe something like this will work for you. Here is the link to the sample. 2.0.5.1\Grid\Samples\In Depth\DropDownFormAndUserControlSample


JT James Tran May 26, 2004 12:53 PM UTC

I took a look at this and it is a modal dialog which is a big no-no in the application I am writing. However, if I make it non-modal, the dropdown form or usercontrol will be fixed while the grid or window is moved. See attached picture. I want to just close the dropdown usercontrol whenever the user moves the parent window, clicks on another cell, scrolls the scrollbar, etc. However, there can be hundreds of different things the user can do and I don''t want to have to write a callback for everyone of them just to close the dropdown usercontrol. I was hoping syncfusion would do that for me. >In 2.0.5.1, we ship a sample that shows how you can drop a form or a usercontrol from a cell. The sample we use is to drop a check listbox control. Maybe something like this will work for you. Here is the link to the sample. > >2.0.5.1\Grid\Samples\In Depth\DropDownFormAndUserControlSample dropdown non-modal_6254.zip


AD Administrator Syncfusion Team May 26, 2004 01:06 PM UTC

Check out the referenced sample again. It has two cell types, one modal and one modaless. The second cell type is a modeless popup and I think it behaves the way you describe. Here are the comments from Form_Load in that sample. // This sample implements two different custom cell controls. // // The first is a DropDownForm cell. This cell control drops // a Windows Forms Form holding a CheckedListBox and two buttons. // It behaves in a modal way, meaning the form captures the input // focus until the user explicitly closes it. This cell derives from // GridDtaticCellRenderer and GridStaticCellModel. // // The second custom cell control is a DropDownUserControl cell. // This cell drops a UserControl holding a CheckedListBox and two // buttons. This cell ties into the grid''s popup architecture to allow // the usercontrol to behave like a combobox in a modaless way. It does so // by being derived from GridDropDownCellRenderer and GridDropDownCellModel.


AD Administrator Syncfusion Team May 26, 2004 01:18 PM UTC

When you look at the sample the way we ship it, concentrate on on the lower 2 dropdowns as they use the popup architecture. If you click on another cell while they are visible, they immediately close. If you try to move the grid''s parent form, they will immediately close. As far as the scrolling goes (since HScrollThumbTrack = false in the sample), the popup stays visible until the grid tries to redraw when you release the thumb. If you change this property, the popup goes away as soon as the grid is scrolled enough to force a redraw.

Loader.
Live Chat Icon For mobile
Up arrow icon