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
close icon

Problems in creating a custom cellmodel using DropdownFormAndUserControl sample.

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 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

4 Replies

AD Administrator Syncfusion Team July 22, 2004 05:53 PM UTC

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

DL Dongxian Li July 22, 2004 06:59 PM UTC

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

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

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;

DL Dongxian Li July 23, 2004 10:58 AM UTC

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

Live Chat Icon For mobile
Up arrow icon