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
165
How to clear a value when ConditionalFormatting is applied
posted

I am using the conditionalformatting to display icon based on the order age. Meaning if the Order is older than 1 hour I am displaying yellow icon and if more than 2 hour red icon and green for lees than 60 min. ConditionalFormatting is working but next to the icon I see the value. How do I not display the acutal min. I only want to display icon but icon and text.

Also I have another column New Customer, where currently I have a check box becuase data field is bit. Here also I would like to display icon if the customer is new and not display anything if the customer is existing customer. TrueConditional formatting did not work but I had to used InitializeRow and its again displaying icon and value (checkbox). In this column also I would like to display icon only if the new customer and nothing if its an existing customer.

Thanks,

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    Sanjaya said:
    I am using the conditionalformatting to display icon based on the order age. Meaning if the Order is older than 1 hour I am displaying yellow icon and if more than 2 hour red icon and green for lees than 60 min. ConditionalFormatting is working but next to the icon I see the value. How do I not display the acutal min. I only want to display icon but icon and text.

    There area number of ways to do this, but I don't think you can do it with Conditional Formatting. There's no way to use Conditional Formatting or an Appearance to hide the text in a cell.

    What I would do is hide the column in the grid that stores the actual data, and then add an unbound column to the grid and set it's DataType to Bitmap. The InitializeLayout event is a good place to do this.

    Then, in the InitializeRow event of the grid, you can examine the hidden column's value and determine which image you want to display and then set the Value of the unbound column to the Image.

    Sanjaya said:
    Also I have another column New Customer, where currently I have a check box becuase data field is bit. Here also I would like to display icon if the customer is new and not display anything if the customer is existing customer. TrueConditional formatting did not work but I had to used InitializeRow and its again displaying icon and value (checkbox). In this column also I would like to display icon only if the new customer and nothing if its an existing customer.

    You could do the same thing here using an unbound column - unless this column needs to be editable by the user.

    If it does, then the thing to do would be to use an UltraCheckEditor either in Custom style or by setting the GlyphInfo to change the images that the CheckBoxe uses.

Children
No Data