Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

select a whole row rather than a cell within the row

Hi,

I have an edit table. I want the user to be able to interact with it at the ROW level, not the cell level. So when they click on the row, the whole row is selected. Also, I want the user to be able to move between rows using the down and up arrows. Is this possible? It is possible in the standard OI edit table, so I would guess it's possible in your table. But I can't see how to make it work in your doco.

Comments

  • edited May 2019
    Hi, i understand that I can achieve this behavior by writing some code, but I was just wondering however if there was a setting that did this automatically, as I imagine that this is a common use case.

    If there isn't that's OK.

    Thanks
  • Showing a row as selected is merely an issue of appearance. The SelectionStyle property allows you to determine how the table appears when a cell is selected. Officially, a single cell is still selected, but you can make it the whole row highlighted.

    The table already supports the ability to navigate up and down with the arrow keys. Is this not working for you?
  • HI Kevin, thanks.

    The up down arrows aren't working for me, but since you say it is supported, then there must be something wrong with my code. I will have a look. I just wanted to make sure that I wasn't looking in vain for functionality that doesn't exist.

    Also, you are right. I will just highlight the whole row. I was just surprised that your table didn't do this automatically, as the OI table does, and I am used to that i guess. But it's fine.



    thanks
  • There are couple of reason the arrows wouldn't work that are legitimate. For instance, if a cell is in edit mode and is multi-lined, then naturally the down arrow would move the cursor within the cell. Also the table behaves like the OI edit table by default in that it won't allow you to arrow around blank rows. If you do not want this behavior, then set the QuickTabOut property to 0.
  • edited May 2019
    ok, my rows are all blank (because the table is just a test table; the real table won't be blank). That must be why.
  • cool it works. thanks so much


  • @josh, if you're wanting only a row selection as opposed to cell selection with a highlighted row, it might be worth reviewing fields 4 and 5 of the selectionstyle property.
    They can help in making the selected cell look the same as all the other cells in the selected row instead of the obvious selection you can see at the moment.
  • @ausmarkb

    yeah, i have removed the black border, so not it looks like the user has just selected the row. If they want to edit a cell, they have to double click on it.
Sign In or Register to comment.