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

Changing cell type to combo - doesn''t work

Thread ID:





16818 Jul 25,2004 02:27 AM UTC Jul 25,2004 06:49 AM UTC WinForms 1
Tags: GridControl
Gil Kalo
Asked On July 25, 2004 02:27 AM UTC

Hi, I''m trying to change cell type to combo, when a specific cell is clicked. Lets say the column contains cells with text, but when a cell is clicked, I want it to become a combo box. I tried doing it using the "CellType" property, and by setting the data source, display member and value member in style info object. I tried call this properties in preparestyleinfo event handler or when the form is loaded, but none of the above has worked! Why? The only way I succeeded to change the cell to combo, is by specifing the whole column as combo, but then, each cell is combo. Is it possible to change only one cell when selected? Thanks in advance, Gil K

Administrator [Syncfusion]
Replied On July 25, 2004 06:49 AM UTC

So you only want to see the combobox when the cell is the currentcell? The simplest way to do this is to set the GridBoundColumn.StyleInfo properties to set the column up as a ComboBox with the CellType/DataSource/DisplayMember/ValueMember properties. In addition, set GridBoundColumn.StyleInfo.ShowButtons = GridShowButtons.ShowCurrentCell. This should only show the button when the cell is current. You would not have to handle any events. If you really want to do this from an event, you would have to do it in QueryCellInfo, but there would be technical problems you would have to overcome if you want to have a different ValueMember than DisplayMember since the grid really needs the cell to be a combobox in order to support this.


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