combo value list

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

4 Replies

AD Administrator Syncfusion Team 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;


AD Administrator Syncfusion Team 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; >


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team 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

Loader.
Up arrow icon