Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
627
Conditional Formatting
posted

Hi,

Do you have an example of conditional formatting on a rows' cells?

I want to change the backColor of the cell according to a comparison between that cell and another one.

Now, I also want to change the format of the cell's value. Meaning, the webGrid is bound to a dataTable which contains double numbers, and I wanna format it, so for example if I have 84.52 I wanna see 84.52% in the webGrid. Will it have any impact on the conditional formatting? (Since I'm comparing two numbers...)

Please advice,

Thanks

Maya

intel

Parents
  • 28464
    posted

    Hello,

    Yes, I think this is possible and relatively easy to implement. I believe a good place to start would be the InitializeRow grid event - it gets fired for each row that is currently being populated and contains all the information for its Cells, so you can check if a certain cell matches your criteria and change the style of some other cell based on that.

    There are plenty of discussions on InitializeRow in this forum or in help - just do a search on "InitializeRow" and you will get a lot of sample code.

    Hope this helps.

Reply Children