Home › Forums › WinForms controls › Xceed Grid for WinForms › CanBeCurrent for an entire column?
When adding data to a grid, you can prevent cells from being selected by:
Dim Row As Xceed.Grid.DataRow = grdData.DataRows.AddNew() Row.BeginEdit() Row.Cells(“ItemID”).Value = CInt(DataReader(“ItemID”)) Row.Cells(“ItemID”).CanBeCurrent = False Row.EndEdit()
Is there a way to do this same thing for a entire column when the column is created?
Imported from legacy forums. Posted by Morgan (had 771 views)
You could try to set the “ItemID” cell‘s CanBeCurrent property of your GridControl’s DataRowTemplate to false.
If the column is already created, there is no alternative but to iterate over the entire Cells collection and setting that property to the desired value.
Imported from legacy forums. Posted by Mohamed [Xceed] (had 938 views)