How do I change the color of a row

gdkve9
Member Posts: 161
Hello everyone,
I am using a touch screen monitor. The form which I am using is a list form. I would like to change the color of the specific record on which user touches.
I have tried the combination of OnFormat() Trigger of the Textbox control and OnAfterGetCurrRec() trigger for working out the same.
But every record of the list gets changed to the specified color.
My mind is stuck ](*,) on searching out a possible way for this.
Advance greetings for everyone who can suggest me how to on this.
Thanks.
I am using a touch screen monitor. The form which I am using is a list form. I would like to change the color of the specific record on which user touches.
I have tried the combination of OnFormat() Trigger of the Textbox control and OnAfterGetCurrRec() trigger for working out the same.
But every record of the list gets changed to the specified color.
My mind is stuck ](*,) on searching out a possible way for this.
Advance greetings for everyone who can suggest me how to on this.
Thanks.
Dilip
Falling down is not a defeat..defeat is when you refuse to get up.
Falling down is not a defeat..defeat is when you refuse to get up.
0
Comments
-
-
Put a boolean on onActivate trigger of textbox..
updatecolor := TRUE;
and write this on onFormat trigger of same..IF updatecolor THEN CurrForm.Description.UPDATEFORECOLOR(255);
0 -
Dear Vijay,
Thanks for the reply.
But OnActive Trigger gets called for every record when form is run and hence again all records are in color=255 (If I am not wrong)Dilip
Falling down is not a defeat..defeat is when you refuse to get up.0 -
Create a function "SetColor" that returns an integer value of the color you want. Then call the function from UPDATEFORCOLOR. The funciton would typically contain a CASE statement to return various color values based on different criteria.
CurrForm.Description.UPDATEFORECOLOR(SetColor);
There are no bugs - only undocumented features.0 -
Hi BBrown,
Again this would set all the records with some color. My exact doubt of point is, what is the exact trigger where system fires at the time of touching a specific record.
For example,
Step 1: I will run a list form, which would show all the records with
Back Color = Blue
Fore Color = White
Step 2: Now user clicks on particular record and do some action by clicking on the funtions Menu button. So when the user clicks on particular record by touching the screen for doing the action, that record only should change to
Back Color = Blue
Fore Color = Red
Hope I tried to make my scenario a bit detailed.
Thanks.Dilip
Falling down is not a defeat..defeat is when you refuse to get up.0 -
gdkve9 wrote:Hi BBrown,
Again this would set all the records with some color. My exact doubt of point is, what is the exact trigger where system fires at the time of touching a specific record.
For example,
Step 1: I will run a list form, which would show all the records with
Back Color = Blue
Fore Color = White
Step 2: Now user clicks on particular record and do some action by clicking on the funtions Menu button. So when the user clicks on particular record by touching the screen for doing the action, that record only should change to
Back Color = Blue
Fore Color = Red
Hope I tried to make my scenario a bit detailed.
Thanks.
Exacty. That is why you use the function to set the color value based on the current record and/or form variables. If you don't want a color change then just exit with ZERO from the function. My common practice is to put this function on the form's main table.There are no bugs - only undocumented features.0 -
Exactly bbrown.
Now I could better explain here my problem where I am actually stuck. I am unable to decide when to return color and when (0) in the function since no trigger executes just on a click of the record except OnActivate Trigger.
But OnActivate trigger also doesnt work since it activates at the Form run which in my case should not happen.
I am trying it out still, I way found I would mention the same here.
But would also look for some suggestions which could help me out here.
Thank u allDilip
Falling down is not a defeat..defeat is when you refuse to get up.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
- 320 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