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
210
UltraWinGrid unexpectedly selecting extra cells on click
posted

I'm having an issue where when a user clicks any cell of an active (and selected) row, all cells above the active row are also selected.  Instead of only the chosen cell being selected.

This behavior only occurs when the active row was set without the grid having focus.  I've verified if set focus on the grid as I select the row the issue goes away, but in this instance I'd prefer not to change the current focus.

From some other posts I tried playing around with something like the following:

      this.Grid.DisplayLayout.Override.SelectTypeCell = SelectType.Single;

With this selection mode on cells the issue lessens, but still occurs.  Instead of all cells from the top of the grid to current row being selected, only the top most row (not counting column headers) and the desired cell are selected.  Using SelectType.None appears to fix the issue and give desired behavior (single cell selection) but there's concern users may not be able to select and edit a cell (so far I've not experienced this in my dev environment).

Anyone else run into this and found a better fix than changing focus?  Or is it expected that with SelectTypeCell = SelectType.None that a single cell in the grid can still be selected and edited?

 

Thanks,

Chad

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Chad,

    Simply clicking on a cell in the grid does not select a range unless the Shift key is down, so it  sounds like something is causing the grid to think that the shift key is down.

    Are you doing something with the shift key? Are you using shift+some other key to launch some other dialog in the KeyDown event, or maybe showing a context menu in the MouseDown or something like that?

    Or perhaps launching another dialog while the shift key is down on the grid?

     

Children