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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBox in DataBoundGrid

Thread ID:





21746 Nov 18,2004 10:42 PM UTC Nov 19,2004 05:09 AM UTC WinForms 2
Tags: GridControl
Asked On November 18, 2004 10:42 PM UTC

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

Replied On November 19, 2004 03:09 AM UTC

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 05:09 AM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon