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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

combo value list

Thread ID:

Created:

Updated:

Platform:

Replies:

10341 Jan 29,2004 06:40 PM UTC Jan 30,2004 12:01 AM UTC WinForms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 29, 2004 06:40 PM UTC

Hi, I have a GridHierDataBoundGrid that contains a databound grid. I need one column of the GridHierDataBoundGrid to be a combobox that gets it''s values from a list that I specify. Can someone provide a code sample of this? Thanks, CB

Administrator [Syncfusion]
Replied On January 29, 2004 08:46 PM UTC

The GDBGwithDropGrids sample has code like this to add dropdown lists from other DataTables. GridStyleInfo style = ((GridDataBoundGrid)e.Grid).GridBoundColumns["EmployeeID"].StyleInfo; style.CellType = "ComboBox"; style.DataSource = this.dataSet11.Employees; style.ValueMember = "EmployeeID"; style.DisplayMember = "LastName"; style.ExclusiveChoiceList = true; If you want to create a list yourself, you can change this code like: style.CellType = "ComboBox"; StringCollection sc = new StringCollection(); sc.Add("11"); sc.Add("22"); sc.Add("33"); style.DataSource = sc;

Administrator [Syncfusion]
Replied On January 29, 2004 09:16 PM UTC

Thanks again, one more question though: I need the value displayed to be based on the value of another column in the same grid, but as I mentioned before I will use a choice list for the drop down portion. Is there a way to specify this? I hope that makes sense >The GDBGwithDropGrids sample has code like this to add dropdown lists from other DataTables. > >GridStyleInfo style = ((GridDataBoundGrid)e.Grid).GridBoundColumns["EmployeeID"].StyleInfo; >style.CellType = "ComboBox"; >style.DataSource = this.dataSet11.Employees; >style.ValueMember = "EmployeeID"; >style.DisplayMember = "LastName"; >style.ExclusiveChoiceList = true; > > >If you want to create a list yourself, you can change this code like: > >style.CellType = "ComboBox"; >StringCollection sc = new StringCollection(); >sc.Add("11"); >sc.Add("22"); >sc.Add("33"); >style.DataSource = sc; >

Administrator [Syncfusion]
Replied On January 29, 2004 09:54 PM UTC

Here are a couple of KB articles that discuss how you can do this. http://www.syncfusion.com/Support/article.aspx?id=567 http://www.syncfusion.com/Support/article.aspx?id=10420

Administrator [Syncfusion]
Replied On January 30, 2004 12:01 AM UTC

Thanks again! >Here are a couple of KB articles that discuss how you can do this. > >http://www.syncfusion.com/Support/article.aspx?id=567 > >http://www.syncfusion.com/Support/article.aspx?id=10420

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.

Warning Icon 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.Close Icon

;