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.

ComboBox in DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

21746 Nov 18,2004 05:42 PM Nov 19,2004 12:09 AM Windows Forms 2
loading
Tags: GridControl
Richard
Asked On November 18, 2004 05:42 PM

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

Richard
Replied On November 18, 2004 10:09 PM

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

Administrator [Syncfusion]
Replied On 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

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.

;