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.

How to open the drop down list in a cell which type is combo box

Thread ID:

Created:

Updated:

Platform:

Replies:

114999 Dec 18,2013 04:58 AM Jan 24,2014 04:02 AM Windows Forms 3
loading
Tags: GridControl
Nick
Asked On December 18, 2013 04:58 AM

In Syncfusion GridData Control's combo box cell, user can't open the drop down list via clicking the cell except the black triangle button on the right.  
Now I need to open the drop down list  via clicking any place in the cell, some good ideas?



Praveena P [Syncfusion]
Replied On December 20, 2013 11:17 PM

Hi Nick,

Thanks for your interest in Syncfusion products.

To open the drop down list  via clicking any place in the cell  of the cell type combo box, kindly make use of GridDropDownStyle.Exclusive property.

code:
  gridControl1[4, 2].DropDownStyle = GridDropDownStyle.Exclusive;

Please let me know if you have any concerns.

Regards,
Praveena.


Nick
Replied On December 30, 2013 06:37 AM

It works well in Windows Form, but not in WPF.

Shakul Hameed M [Syncfusion]
Replied On January 24, 2014 04:02 AM

Hi Nick,

 

Sorry about the delay caused in getting back to you.

 

We have analyzed your query and we are tried to achieve your requirement by setting the IsDropDownOpen as True.

We have done this by listening the CurrentCellLoaded event.

 

Please refer the following code snippet.

 

Code Snippet:[C#]

void dataGrid_CurrentCellLoaded(object sender, GridCurrentCellLoadedEventArgs e)

        {

            var combobox = (e.UIElement as GridCellComboBoxDropDown);

                if (combobox != null)

                {

                    combobox.Dispatcher.BeginInvoke(new Action(() =>

                        {

 

                            combobox.IsDropDownOpen = !combobox.IsDropDownOpen;

                        }), DispatcherPriority.ApplicationIdle);

 

                    combobox.IsDropDownOpen = true;

                }

        }

 

We have prepared the sample based on your requirement and please find the attached sample.

 

Please let us know if this solution helps you.

 

Thanks,

Shakul Hameed



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

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.

;