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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CheckedListBox with a Grid Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

11288 Mar 1,2004 11:17 PM UTC Mar 3,2004 07:46 AM UTC WinForms 7
loading
Tags: GridControl
Anthony Hand
Asked On March 1, 2004 11:17 PM UTC

Hi, guys -- I''d like to have a Grid Cell that behaves like this: - In the Grid cell, a ComboBox control displays. - Click on the ComboBox control, and a popup window displays a CheckedListBox control. The user clicks one (or more) items, then clicks "OK" to close the poup. - The Grid cell now also displays the text of the selected item(s) separated by a programmer-cusomizable delimiter, like a comma. First question is: Do you have any samples that do this? Second question is: If not, do you have any samples that show quick & easy how to display a combobox control in the Grid Cell and, when clicked, displays a Syncfusion PopupContainer? The rest I''ll be able to figure out easily. Thought I''d check just in case... Many thanks, Anthony

Anthony Hand
Replied On March 2, 2004 01:36 AM UTC

I should add that if you have any samples that show how to use a custom Popup container with the Cell''s Combobox, that would be great! Because there are several other types of custom popups that we''d like to create. I didn''t notice any in the otherwise excellent selection of Grid samples... Thanks! Anthony

Administrator [Syncfusion]
Replied On March 2, 2004 03:14 PM UTC

It is straight-forward to derive a cell control and popup up modal form. It takes a little more effort to display something in a popup window due to the focus issues involved. Below is a sample that has 2 derived cell controls. One pops up a modal form by deriving from the static cell control. The other shows a UserCOntrol in a popup window by deriving the GridDropDownCell control. This class handles the focus issues. DropDownFormSample_9630.zip

Anthony Hand
Replied On March 2, 2004 08:43 PM UTC

Thanks for the great sample, Clay!

Anthony Hand
Replied On March 2, 2004 10:04 PM UTC

Apparent bug in the sample... The sample very nicely shows two ways to implement a Grid Cell with a drop-down control in the cell which, when clicked, displays a popup window. One version of the popup is a Form, the other is a UserControl. There appears to be a bug in the UserControl version, however. After the user makes a new selection of items in the CheckedListBox and clicks OK, the text of the selected items is NOT displayed in the Grid Cell. Well, at first it does, but then the new Cell.Text values are overwritten by whatever the original values were when the cell was first initialized. The derived Form works fine, however. And wouldn''t you know it, I''d prefer to use the UserControl version instead... When you have a moment, would you be able to see why it does that? I''ll continue looking for possible answers, as well. Thanks! Anthony

Administrator [Syncfusion]
Replied On March 2, 2004 11:26 PM UTC

Using 2.0.2.x, I do not see this behavior. If I drop the bottom cell, and select choice 1, and then click OK, I see 3 choices in the cell. If I tab to the next cell or click on another cell, the three values are still there. Do you see some other behavior in the sample? If so, what version of our DLLs are you using?

Administrator [Syncfusion]
Replied On March 2, 2004 11:40 PM UTC

I''m using 2.0.2.1. I did some poking around and may have discovered the issue. In the DropDownUserCellRenderer.OnSaveChanges() method, we assign the Cell.Text its new value. Unfortunately, those new values didn''t seem to propagate to the renderer''s ControlText property. So by adding the line: this.ControlText = newValues; It''s now working fine. Ideas? - Anthony >Using 2.0.2.x, I do not see this behavior. If I drop the bottom cell, and select choice 1, and then click OK, I see 3 choices in the cell. If I tab to the next cell or click on another cell, the three values are still there. > >Do you see some other behavior in the sample? If so, what version of our DLLs are you using?

Administrator [Syncfusion]
Replied On March 3, 2004 07:46 AM UTC

I see what you mean. You are saying when you drop the usercontrol a second time (without leaving the cell), the user control is initialized with the old values. I think your change is OK to handle this problem. But it can also be handled with a slightly different DropDownContainerCloseDropDown override, setting the ControlValue at that point. Here is the sample modified to do this plus it has modified so the UserControl fires events when you hit cancel or save. This allows the renderer to subscribe to these events, and thus removes the necessity for the usercontrol to have access to the grid. This isolates the usercontrol from any knowledge of the grid or renderer. DropDownFormSample-1_9495.zip

CONFIRMATION

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.

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

;