web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Using DisplayOption method to colourize rows in a grid

(0) ShareShare
ReportReport
Posted on by

DisplayOption   is  used to colourize  rows in a gird based on field value the issue is that when a row is selected its colour is missed , how can I keep the colour of the selected record ? the grid property highlight active is marked as no 

I have the same question (0)
  • Vishal Dhavgaye Profile Picture
    405 on at
    RE: Using DisplayOption method to colourize rows in a grid

    Try if this works for you, This worked for me. 

    public void displayOption(Common _record, FormRowDisplayOption _options)
    
    {
        super(_record, _options);
        RequestHelper::modifyGridcolorOnStatus(_record, _options);
    }
    
    
    
    Class RequestHelper -
    
    public static void modifyGridcolorOnStatus(Common _record, FormRowDisplayOption _options)
    { 
        RequestTable requestTable = _record as RequestTable; 
        _options.backColor(RequestHelper::setRequestStatusColor(requestTable));
    }
    
    public static CCColor setRequestStatusColor(RequestTable _requestTable)
    {
        CCColor color = WinApi::RGB2int(255,255,255);
        
        if (requestTable.staus == XXX)
        {
            color = asuInventRequestStatusColor.Color;
        }
        
        return Color;
    }
     
    
    

  • maram fraij Profile Picture
    on at
    RE: Using DisplayOption method to colourize rows in a grid

    Is it possible to disable row selection in gird ?

  • André Arnaud de Calavon Profile Picture
    298,959 Super User 2025 Season 2 on at
    RE: Using DisplayOption method to colourize rows in a grid

    Hi Maram,

    A selected record will always have the color as per selection (style). You can't override this behavior.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,239

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 903 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 604 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans