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
785
Maintaining A selection Overlay when active row is selected.
posted

Ok let me see if I can explain what I want to do...

I have grid with a Selection Overlay.  The user selects several rows and at this point the Active Row/Cell is on the last row in "selected".   Now when the user click on a row the selection overlay is reset to the last row.

What I want, is that if the user clicks on a cell anywhere in the "selected" rows, the selection is maintained when the cell goes into edit mode. 

The idea, is I want the user to be able to enter values in one cell and have the values in the same cell on other selected rows change to what the user has entered in the active cell.  My problem is, as soon as I "active" a cell the selection overlay clears.

Ideally, if the user clicked on a row that was NOT in the selection then it would clear the selection.  if they click a row that IS in the selection it would maintain the selection. 

Here is an example:

The grid has several rows selected.

 Now I want to go and enter a value in the "One Plug" column and then have all the rows have the same value.

But as soon as I click on a the "One Plug" cell, it puts clear s the selection.

I'm not worried about updating the values in the other cells.  I know that I will have to use the SelectedRows collection in the CellChange event handler.  I know how to do this. 

But I need the selection to be "sticky".   So is there an easy way to do this?  The setting has not popped out at me.   I'm playing with Before and After Row active to see if I can make it work.  But I thought I would ask before I spent to much time hacking around...

Dan

Parents Reply Children
  • 785
    Offline posted in reply to Dan

    Ok so I got it working exactly how I wanted it to work.

     You see here that I have a group of rows selected.

    Then when I click on one of the editble cells, it highlights the cells that are being massed updated.

     Then as I type the values are automatically filled in down the grid.

     

     This is VERY sweet!  Thanks so much for pointing me in the right direction.  It woks exactly how I want it to.  Now I'm going to go see if I can use a draw filter to put a nice thick border around the block and then it will be perfect!

    I also need to see if I can package the code up into a snippet so that I can drop it on any grid.   I think I will use this over and over.   Of course everytime I figure something like this out I have to decide if I want to go back to other grids and add this functionality.  

    Thanks for your help!  Again!

    Dan