Home Forums WinForms controls Xceed Grid for WinForms CanBeCurrent for an entire column?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17406 |

    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)

    Xceed Support
    Member
    Post count: 5658

    Hi Morgan,

     

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.