Highlight row in grid
mikkelbm
Member Posts: 4
Hi,
I'm pretty new to C/AL development, and I'm looking for a way to highlight/bold the text of a row in a grid.
I found a way by doing something like this:
Is it correct that I have to do this for every column in my grid? Isn't there a function or something to format the entire row?
Thanks!
/Mikkel
I'm pretty new to C/AL development, and I'm looking for a way to highlight/bold the text of a row in a grid.
I found a way by doing something like this:
No. - OnFormat(VAR Text : Text[1024];) // The format-method
IF ("Marked for Routing" = USERID) THEN BEGIN
CurrForm."No.".UPDATEFONTBOLD(TRUE);
CurrForm."No.".UPDATEFORECOLOR(255);
END ELSE BEGIN
IF ("Marked for Routing" <> '') THEN BEGIN
CurrForm."No.".UPDATEFONTBOLD(TRUE);
CurrForm."No.".UPDATEFORECOLOR(0);
END ELSE BEGIN
CurrForm."No.".UPDATEFONTBOLD(FALSE);
CurrForm."No.".UPDATEFORECOLOR(0);
END;
END;
Is it correct that I have to do this for every column in my grid? Isn't there a function or something to format the entire row?
Thanks!
/Mikkel
0
Answers
-
mikkelbm wrote:Is it correct that I have to do this for every column in my grid? Isn't there a function or something to format the entire row?
Thanks!
/Mikkel
Yes, that's correct. There isn't a function to format the entire row..
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
Hi Mikkel,
Tino is correct there is no function for the row but I can suggest two things.
1. use a functions to decide the colour and bold e.g.
CurrForm."No.".UPDATEFONTBOLD( recordbold );
CurrForm."No.".UPDATEFORECOLOR( recordcolour );
this work the same way but it save a hugh amount of time if you ever need to change the colour scheme/causes. You then only have to change the functions recordbold and recordcolour instead of going into the trigger of each field
2. you can use the marked flag on the record ( put a black mark at the start of the row)0 -
Hi again,
Thanks a lot for your quick response. I will make a function to handle the color and font-weight.
I'm not only new to Navision, I'm also new to this forum
- so should I close this thread or something, when I feel my question has been answered? 0 -
You can put (SOLVED) in the subject before the actual subject of the first post when you edit it.
Welcome on Mibuso!
Tino Ruijs
Microsoft Dynamics NAV specialist0 -
Perfect! Thanks...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
