Finding highlighted rows?

ecarmodyecarmody Member Posts: 53
edited 2010-06-14 in Navision Attain
Hello,
I would like to do something simple like loop through the rows on the current form/tablebox and find the current selected/highlighted rows.

I've searched the help and a property something like IsSelected doesn't pop out, nor a function to test if row is highlighted.

Appreciate any tips/suggestings to this seemingly simple task.
Thanks,
Eric

Comments

  • SavatageSavatage Member Posts: 7,142
    Not sure your question is clear here.

    A selection can only be in a range.. are you thinking about perhaps filtering on just the hilited lines?? I can't Hilite a line scroll around an highlight another without losing the hilite on the orig line unless it's a range.

    HAve you tried using Marking, then view->marked only?

    You can hilite 1 or many lines and with ctrl-f1 you can mark them.
  • ecarmodyecarmody Member Posts: 53
    Not really.

    The scenario is that a user is viewing a tablebox list of records. They select row(s) by mouse clicking; select multiple rows by CTRL+mouse or range of rows by SHIFT+mouse click.

    In my code I want to be able to loop through the records of the tablebox (REC) and take action with the rows that the user has highlighted.

    My issue is that I don't know what property/function to use to tell is a row is hightlighted as I loop through the rows of the tablebox on the form.

    IF Rec.FIND('-') THEN
    REPEAT
    //if row is highlighted/select then ...
    UNTIL Rec.NEXT = 0;


    I have not used the MARK functionality before. Would anther approach be for the user to select the rows as above, but to then use the CTRL-F1 to mark them, then in my code is check for the MARK rows?

    I'd rather not have to do the CTRL-F1 to mark rows, but rather my first way above.
  • kinekine Member Posts: 12,562
    Look for CurrFrom.SETSELECTIONFILTER(MyRecord). This will set filter to MyRecord which is based on User selected records in the Rec of the form... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • davmac1davmac1 Member Posts: 1,283
    Thanks for another useful tip.
Sign In or Register to comment.