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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to have multi-selection cell?

Thread ID:





14361 May 25,2004 06:46 PM UTC May 26,2004 01:18 PM UTC WinForms 4
Tags: GridControl
James Tran
Asked On May 25, 2004 06:46 PM UTC

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

Administrator [Syncfusion]
Replied On May 25, 2004 07:19 PM UTC

In, 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.\Grid\Samples\In Depth\DropDownFormAndUserControlSample

James Tran
Replied On 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, 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. > >\Grid\Samples\In Depth\DropDownFormAndUserControlSample dropdown non-modal_6254.zip

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon