Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / igniteui igxgrid angular row background color dynamic

igniteui igxgrid angular row background color dynamic

New Discussion
arsv M
arsv M asked on Jun 10, 2021 6:58 PM

 Is there a way to set the background color for rows (igxgrid)  dynamically based on a status column(string/number) value?

green – completed

red – errors

blue – running

Sign In to post a reply

Replies

  • 0
    Aleksandar Kamenov
    Aleksandar Kamenov answered on Mar 22, 2019 8:35 AM

    Hello Siva,

    Yes, it is possible and you can see how you could achieve the approach from the sample here.

    If you have further questions, please contact us again.

    • 0
      arsv M
      arsv M answered on Mar 22, 2019 1:45 PM

      Thanks for your reply. Sample link isn't working. Can you please check?

      • 0
        Aleksandar Kamenov
        Aleksandar Kamenov answered on Mar 25, 2019 8:09 AM

        Hello Silva,

        Sorry about the inconvenience. Could you please try again with the new link.

      • 0
        arsv M
        arsv M answered on Mar 25, 2019 6:59 PM

        Thanks for updating the link. In the example you are changing row color on a button click event which is not am looking. 

        On igxgrid loading data I want to set different colors for each row based on a grid column value either number or string.(as in screenshot)

      • 0
        Aleksandar Kamenov
        Aleksandar Kamenov answered on Mar 26, 2019 9:34 AM

        Hello,

        The goal of the sample was just to show how you could change the background color.

        Again the sample was modified in order to show how you could achieve your scenario.

        Next time please try to go through the API documentation of the component you need to interact with and see what are the capabilities that the component provides. I think the documentation is enough descriptive and intuitive.

        Also we have a documentation describing some common configurations of the components with the samples attached to it.

        We would be glad if you could provide us with some feedback related to both documentations I have referred above. If there is something you don't understand or it is not enough clear, please let us know.

      • 0
        jaafri adnane
        jaafri adnane answered on May 21, 2020 3:47 PM

        Hello,

        Thank you for your response, I'm trying to use this solution and I'm not getting the same result the array is empty,

        I think that is due to the new version, and maybe the way has changed,

        can you explain please how to access row data with the new version?

        thank you in advance

      • 0
        Karl Costenbader
        Karl Costenbader answered on Jun 10, 2021 6:58 PM

        For anyone attempting to use this approach, please be aware that it will not work. As soon as the row is re-rendered the formatting applied to the native element will be lost. This can be verified in the sample by simply scrolling down so the first few rows are no longer visible, and then scrolling back up.

        It would be extremely helpful if Infragistics could provide the ability to specify row level classes based on content within that row.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
arsv M
Favorites
0
Replies
7
Created On
Jun 10, 2021
Last Post
5 years, 4 months ago

Suggested Discussions

Created by

Created on

Jun 10, 2021 6:58 PM

Last activity on

Jun 10, 2021 6:58 PM