grid cell color changing

 


    <script type="text/javascript">

        function setActionButtonColor()

        {

            var x = document.getElementsByClassName("toolsBtn");

            var i;

            for (i = 0; i < x.length; i++)

            {

                if (x[i].getAttribute("data-cmd") === "attachments")

                {                  

                    x[i].style.backgroundColor = "red";                   

                }

            }

            if (px_all && px_all["ctl00_phG_tab_t0_grid"] && px_all["ctl00_phG_tab_t0_grid"].rows)

            {

                let lines = px_all["ctl00_phG_tab_t0_grid"].rows.items;

                

                for (let i = 0; i < lines.length; i++)

                {

                    let currentLine = lines[i];

                    currentLine.cells[0].style = 'background-color: red';

                    currentLine.cells[0].repaint();                 

                }

            }

          

        };

    </script> 

Comments

Popular posts from this blog

grid row color and button color in acumatica

Dynamic dataview creation