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

Binding column appearance

Hello, i have a binding column who works fine, the code is: gbc = this.gdgUtilisateur.Binder.InternalColumns["Fk_Profile"]; gbc.StyleInfo.CellType = "ComboBox"; gbc.StyleInfo.DataSource = dtProfile; gbc.StyleInfo.DisplayMember = "Profile"; gbc.StyleInfo.ValueMember = "Pk_Profile"; gbc.StyleInfo..ShowButtons = GridShowButtons.Hide; Now i want to show the Display Member like a Label (I don''t want the user able to select or change the text in the cell). I try gbc.StyleInfo.CellType = "Label" but it''s the value member that is shown... Is it possible to do that ?

2 Replies

AD Administrator Syncfusion Team January 13, 2005 02:03 PM UTC

You can also set gbc.StyleInfo.Enabled = false; to see if that will serve your needs. (This column would never be able to hold the current cell if you have this setting.) If you do not want to disable the column, then you can handle the CurrentCellStartEditing event. If grid.CurrentCell.ColIndex point to this column, you can set e.Cancel = true.

SV sve January 13, 2005 02:10 PM UTC

Handle the CurrentCellStartEditing and set cancel to true is exactly what i search. Thanks very much.

Live Chat Icon For mobile
Up arrow icon