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 22.214.171.124.
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.
ADAdministrator Syncfusion Team July 22, 2004 01:53 PM
Check out the following kb article. It explains how to use dropdown cells within a dropdown grid
DLDongxian LiJuly 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.
ADAdministrator Syncfusion Team 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.gridControl1.DropDownContainerParent = this.DropDownContainer; //added......
ddUser.Visible = true;
DLDongxian LiJuly 23, 2004 06:58 AM
Yes. That works. Thanks a lot for the excellent support.