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

ComboBox in DataBoundGrid

I am trying to use a ComboBox in a databound grid. Here is the criteria: 1. grid must be bound to a datatable. 2. drop down items come from a stringcollecion, or preferrably another datatable. Here is my current test source. // set the data source to the datatable grdObjects.DataSource = dt; grdObjects.BeginUpdate(); // create a sting collection System.Collections.Specialized.StringCollection items = new System.Collections.Specialized.StringCollection(); items.Add("One"); items.Add("Two"); items.Add("Three"); items.Add("Four"); items.Add("Five"); items.Add("Six"); items.Add("Seven"); items.Add("Eight"); items.Add("Nine"); items.Add("Ten"); // setup the dropdown boxes in column 2 for (int i=0;i
2 Replies

RI Richard November 18, 2004 10:09 PM

Sorry, I should have added, that the code runs through just fine, but the dropdowns do not display.


AD Administrator Syncfusion Team November 19, 2004 12:09 AM

In a GridDataBoundGrid, you set style properties for a column using the GridBoundColumn.StyleInfo property of that column. See this KB article. http://www.syncfusion.com/Support/article.aspx?id=562 In a GridDataBoundGrid, the code you listed (using an indexer on individual cells to set style properties other than CellValue or Text) does not work. See this KB article. http://www.syncfusion.com/Support/article.aspx?id=560

Loader.
Live Chat Icon For mobile
Up arrow icon