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
1060
Both Column and Row Selected in Grid
posted

I need to select one column and one row in a grid. I can change these selection using CTRL key with view. But how can i change both column and row selection dynamically (through code in C#)?

Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    Sorry, i was out of the office Friday, so i haven't had a chance to review the forums until this morning. 

    As for your question, i reviewed the code, and we explicitly check to see if the ctrl or shift key is down, whenever switching between different types of selection (i.e. column, cell and row).  Which is why when you select a column, then a row, only the row is selected. 

    Unfortunately this was just a case we never considered. 

    However, you could just change the style of the row and column your self, when clicking an active cell and forget the row and/or column selection. 

    Each Column and Row has a CellStyle property, so you can use that to change the appearance, along with the ActiveCellChanging event, which gives you both the activeCell and previously activeCell, so that you can set the new one, and reset the previous one to null. 

    Hope this helps, 

    -SteveZ

Children