Set Selected (currently active) Row on databound grid

Posted by: rob on 11 November 2017, 8:03 am EST

    • Post Options:
    • Link

    Posted 11 November 2017, 8:03 am EST

    The grid is bound to a form level Dataset

    During the Form Activate event…

    After populating the data set, reading in the saved layout file from the prior user session, then refreshing the grid.

    I am trying to set the second row of the grid to be highlighted/selected.

    None of the exposed methods or properties work.

    I have tried every technique in the documentation with no success.

    Has someone experienced and subsequently solved this problem ?

  • Posted 14 November 2017, 12:58 am EST

    Hi Rob!

    It seems that you are working with C1FlexGrid. In this case, you can try the following code snippet to select the second row:

    _flex.SelectionMode = SelectionModeEnum.Row;
    _flex.Select(2, 1);
    

    Or:

    _flex.Select(_flex.GetCellRange(2, _flex.Cols.Count - 1, 2, 1));
    

    Hope this helps you.

    Thanks,

    Meenakshi

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels