How to highlight the current record?

NaviDevNaviDev Member Posts: 365
Hello All,

For example in the sales line, the user pointed and click on any field, that line should be highlighted. I know that we can do this by clicking on the Rows bar on the left side. But how can i do this with just selecting the columns? Then if i selected another record, it should release the highlight on the last record, and highlight the current record.
Navision noob....

Answers

  • matteo_montanarimatteo_montanari Member Posts: 189
    NaviDev wrote:
    Hello All,

    For example in the sales line, the user pointed and click on any field, that line should be highlighted. I know that we can do this by clicking on the Rows bar on the left side. But how can i do this with just selecting the columns? Then if i selected another record, it should release the highlight on the last record, and highlight the current record.

    Hi

    Sorry, i think it's impossible :)

    Bye

    Matteo
    Reno Sistemi Navision Developer
  • matttraxmatttrax Member Posts: 2,309
    I think a better question is why? As you stated, NAV supports the highlighting of a row by clicking on that row bar on the left side. If the entire row is highlighted, then the user can't edit the field they clicked on.

    Sounds like more of a training / user saying "I have to click THERE to do this?!?!" issue. If it's not, please explain in more detail :D
  • NaviDevNaviDev Member Posts: 365
    I know its a poor and lousy question. But come to think of it, what if the user is having poor sight. Yeah, somehow he can see that there is a arrow sign in the left part of the table, but its not enough for him to see the whole line. Mostly users with ages is encountering this issue. And yes, we know that its really not that relevant to apply this functionality. But for them it is, and even more if they are handling very important data's :)

    Moving on..... Is there any other suggestion you can give me? Thanks in advance.
    Navision noob....
  • matttraxmatttrax Member Posts: 2,309
    I'm pretty sure you'll have to use SendKeys. You can combine up / down arrow presses with Ctrl+A. One focus is on a field the Ctrl+A does not work. To understand better, click on a field in the sales lines and hit Ctrl+A. You'll see that the text is highlighted, not the entire row. But if you shift focus using the arrow keys away from that line and then back to it, Ctrl+A highlights everything.

    It's a starting point for you anyway.
  • garakgarak Member Posts: 3,263
    u can use the CurrForm.Field.UPDATESELECTED(Condition) function. but this u must set on all controls in your list.

    The condition is: select only the rec from the AfterGetCurrRecord() and disselct the others.

    but what is, if the user will there use the Ctrl+LeftMouseClickOnTheFirstGreyCell to select more then one rec (for example there is a function that use setselectionfilter()) ?

    And if the user has a poor sight, than the solution with the blue line is not the best solution. By one of my customers there is also a user with a very poor sight. Extra for this user we create separate forms that he can use (on the forms are only the needed datas and the Labels are larger then on a standard form). Also we set down the resolution of this workstation to 800/600 or 1024/768
    Do you make it right, it works too!
  • SPost29SPost29 Member Posts: 148
    double click on any column in the row and the row is highlighted
    move to another row double click on any column and that row is highlighted

    this should only be a half day training session for most users :D
    Steve
  • NaviDevNaviDev Member Posts: 365
    Guys I appreciate your suggestions. Have solve it finally using the sendkeys.
    Navision noob....
  • garakgarak Member Posts: 3,263
    Senkey i only use, if there is no other way. For this problem i would use something like this:
    Name	DataType	Subtype	Length
    XMLDomDoc	Automation	'Microsoft XML, v6.0'.DOMDocument	With Event
    xCode	Code		20
    
    Form - OnOpenForm()
    if isclear(XMLDomDoc) then
      create(XMLDomDoc);
    
    Form - OnAfterGetCurrRecord()
    XCode := Code;
    
    if XCode <>  '' then
      DomDoc.loadXML('<root></root>')
    
    XMLDomDoc::onreadystatechange()
    if XMLDomDoc.readyState = 4 then begin
      currform.update(false);
    end;
    
    Code - OnFormat(VAR Text : Text[1024];)
    CurrForm.Code.UPDATESELECTED(XCode = Code);
    
    Do you make it right, it works too!
  • NaviDevNaviDev Member Posts: 365
    Hello garak,

    I think that doesn't meet the requirement. It will only highlight the cell, not the record(the whole line).

    Thanks for sharing anyways.
    Navision noob....
  • SolmyrSolmyr Member Posts: 51
    NaviDev wrote:
    It will only highlight the cell, not the record(the whole line).
    to highlight the record you need to put this line for each field:
    Field - OnFormat(VAR Text : Text[1024];)
    CurrForm.Field.UPDATESELECTED(XCode = Code);
    
    Oleg Dovgalenko
Sign In or Register to comment.