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

Problems in creating a custom cellmodel using DropdownFormAndUserControl sample.

Thread ID:

Created:

Updated:

Platform:

Replies:

16734 Jul 22,2004 12:48 PM Jul 23,2004 06:58 AM Windows Forms 4
loading
Tags: GridControl
Dongxian Li
Asked On July 22, 2004 12:48 PM

Hello, I want to create a custom cellmodel that contains a GridControl. So I did some experiment with the included DropdownFormAndUserControl sample that comes with Syncfusion release 2.0.5.1. I modified DropdownUserControl(DropdownUser.cs) to include a GridControl in addition to the original checkedListBox. I set some cells of the newly added GridControl to be of ComboBox celltype and set its ChoiceList to a StringCollection list and run the sample. The problem is when I click the comboBox in the newly added GridControl, the dropdown window gets closed immediately. So I can not set the value for the combobox cells. Looks like the parent GridControl is receiving the click and closes the dropdown window. How Can I prevent this to happen? Attached is the modified sample solution. Please give advice. Thanks dongxian DropdownUserGrid_3631.zip

Administrator [Syncfusion]
Replied On July 22, 2004 01:53 PM

Check out the following kb article. It explains how to use dropdown cells within a dropdown grid http://www.syncfusion.com/Support/article.aspx?id=10090 Stefan

Dongxian Li
Replied On July 22, 2004 02:59 PM

I looked at the kb article and found that my sample is also using GridDropdownContainer as the popupContainer, which is the same as in the kb article sample. The difference between these two samples is: I am using the dropdownGrid as a celltype of a GridControl. While in the kb article sample, the dropdownGrid is shown when user clicks the button in the form. Please take a look at my attached file in previous message and give me some advice. Thanks dongxian

Administrator [Syncfusion]
Replied On July 22, 2004 03:03 PM

I was able to get your sample to work by making 2 changes: 1) In the DropDownUser class, change the access modifier of gridControl1 from private to public so it can be accessed through an instance of the class. 2)In the DropDownContainerShowingDropDown override in the DropDownUserCellRenderer class, add this line at the bottom. this.ddUser.SetValuesFromString(this.ControlText); this.ddUser.gridControl1.DropDownContainerParent = this.DropDownContainer; //added...... ddUser.Visible = true;

Dongxian Li
Replied On July 23, 2004 06:58 AM

Yes. That works. Thanks a lot for the excellent support. dongxian

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.

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.

;