in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

select cell in entercell event when user double clicks

Last post 09-10-2007 9:49 AM by C1_GregL. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-28-2007 1:21 PM

    select cell in entercell event when user double clicks

    Hi,

    I have a flexgrid and I don't want the user to be able to enter certain columns.

    So in the EnterCell event I see which column it entered and if it's one of the forbidden ones it is sent to another using the grid's Select method.

    My problem is when the user double clicks a cell in a forbidden column. In this case the select method doesn't behave the same way: the focus disappears from the grid and the cursor remains in the forbidden cell...

    The editor property is null so the grid is not in editing mode... right?

    I tried StartEditing in another cell, then FinishEditing and then the Select. It works, but I don't think it is correct...

    Should I use a different method to select the correct cell or a different event to detect the changing of the cell?

    Thanks
     



     

     
     

  • 09-10-2007 9:49 AM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: select cell in entercell event when user double clicks

    You can restrict editing of the column and then simply use the Select method in the EnterCell event.  

    C1FlexGrid1.Cols(x).AllowEditing = False

    To avoid the blue selection box in the restricted column, set the SelectionMode on load to Cell

    C1FlexGrid1.SelectionMode = C1.Win.C1FlexGrid.SelectionModeEnum.Cell

    Hope that helps
    -Greg L

     

Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.