Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Row sometimes select even though only allowed to select Cell
posted

Hi,

I'm using an UltraWinGrid (Net 4, Version 2011.2), which is allowed to select only a single cell, though the code below

this.grid.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False;
this.grid.DisplayLayout.Override.SelectTypeCell = SelectType.Single;
this.grid.DisplayLayout.Override.SelectTypeCol = SelectType.None;
this.grid.DisplayLayout.Override.SelectTypeRow = SelectType.None;
this.grid.DisplayLayout.Override.CellClickAction = CellClickAction.CellSelect

Most of the time, it works as expected.

However, in some circumstances, which appear to be a bit random and can't reproduce at will, when the user is navigating in the grid, sometimes the whole row will get selected.

The selection border will be focused on the row, and using the Up and down keys will move the selection to the row above/below. Left or Right keys have no effect because the whole row is selected.

The only way to get around that is to use the mouse to click a cell explicitily, after which the "single-cell" selected behavior is back, but it frustrates end-users.

Am I omitting to set any property or should I be watching out for anything particular here?

Thanks.

Parents
  • 71886
    Offline posted

    Hello Kharlos,

    The only time I saw this behavior with the above code is the first time the grid initializes when I am running the application. I have put the following line to get around this:

       this.grid.ActiveCell = this.grid.Rows[0].Cells[0];

    I attached my sample to this post, so please take a look, modify it if necessary and please try to reproduce this behavior as I am not able to do so. 

    SelectTypeGrid.zip
Reply Children