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

No subject

Thread ID:





7292 Sep 18,2003 02:48 PM UTC Sep 19,2003 03:23 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On September 18, 2003 02:48 PM UTC

Got a question about ComboBoxes in a DataBound Grid. I have a column that depending on a value in another column, the user is able to either type in a value (ie have a regular textbox cell) or select a value from a drop down ComboBox (which table populates this combo box is dependent on the value in that other column). Is this possible in a DataBoundGrid? Can you provide a VB example? Thanks Javier

Administrator [Syncfusion]
Replied On September 19, 2003 09:51 AM UTC

Here is a KB article that has a sample. http://www.syncfusion.com/KB/Grid/Grid_c39c.asp#q567q There are other ways to do this if the technique is not what you need, ask again....

Administrator [Syncfusion]
Replied On September 19, 2003 02:16 PM UTC

I believe this would work, thank you. I do have one question, can you have the empty combo box display as a textbox instead. I think it be easier for the user to see what fields they need to type something in, and which fields need to have a value selected. Javier

Administrator [Syncfusion]
Replied On September 19, 2003 03:23 PM UTC

You can use the GridStyleInfo.ShowButtons property to determine when a button is visible. But if you want some buttons in the column to show, and other buttons in the same column not to show, then you would have to handle the grid.Model.QueryCellInfo event. In your handler, test e.ColIndex and e.RowIndex to see if they point to your combobox column. If they do, you would conditionally set e.Style.ShowButtons depending on whether you want to see the button. You might be able to use e.Style.Text.Length to decide when the button should show.


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