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

CellType DropDown Menu GridGroupingControl

Hi
 
I would like to be able to set the cell type to a dropdown menu of specified values. Is that possible?
 
Thank you
 

3 Replies

VK Vinish Kumar K Syncfusion Team February 8, 2013 10:13 AM UTC

Hi Gaukhar Massabayeva,

 

Thank you for your interested in Syncfusion products,

 

Query

Drop Down cell type with specified values.

You can set the DropDown cell type using the GridTableCellStyleInfo. Please refer the following codes for further reference.

 

GridTableCellStyleInfo ggcStyle = gridGroupingControl1.TableDescriptor.Columns["Customers"].Appearance.AnyRecordFieldCell;

            ggcStyle.CellType = "ComboBox";

            ggcStyle.DataSource = this.GetTheComboTable;

            ggcStyle.ValueMember = "CustomerID";

            ggcStyle.DisplayMember = "CustomerName";

 

// data source.

 

private DataTable GetTheComboTable()

        {

            DataTable dt = new DataTable("Customers");

 

            dt.Columns.Add(new DataColumn("CustomerID", typeof(int)));

            dt.Columns.Add(new DataColumn("CustomerName"));

 

            dt.Rows.Add(new object[] { 5, "William Wordsworth" });

            dt.Rows.Add(new object[] { 3, "Mark Twain" });

            dt.Rows.Add(new object[] { 2, "James Dickey" });

            dt.Rows.Add(new object[] { 4, "Emiley Dickinson" });

            dt.Rows.Add(new object[] { 1, "William Bronk" });

 

            return dt;

        }

Please use this codes in your application if you have further concerns please let me know we will provide the solution.

 

 

Regards,

Vinish.



GM Gaukhar Massabayeva February 13, 2013 05:06 PM UTC

Hi Vinish, I used your code and the problem I am getting is. Once I select an item from the dropdown menu in One cell - All dropdown cells get populated with that value.

Can you replicate the same issue?



AK Arun Kumar V Syncfusion Team February 18, 2013 04:17 AM UTC

Hi Gaukhar Massabayeva,

Thanks for the update.

Query:

select an item from the dropdown menu in One cell - All dropdown cells get populated with that value.

I have attached a sample file based on our latest version for the reported behavior. Please let me know what version you are using, and if possible please give me a screenshot reporting the behavior. So that I can give some better information to get the exact behavior.

Please let me know if you have any other concerns.

Regards,

Arun.



CS_1ae168b0.zip

Loader.
Live Chat Icon For mobile
Up arrow icon