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.

combo value list

Thread ID:

Created:

Updated:

Platform:

Replies:

10341 Jan 29,2004 01:40 PM Jan 29,2004 07:01 PM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 29, 2004 01:40 PM

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 03:46 PM

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 04:16 PM

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 04:54 PM

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 29, 2004 07:01 PM

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.

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.

;