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
1675
Styling DataBarConditionalFormatting
posted

Hi,

I learnt about the DataBarConditionalFormatting http://help.infragistics.com/Help/NetAdvantage/Silverlight/2012.1/CLR4.0/html/xamGrid_Conditional_Formatting.html but failed to understand how to extend and use it so that i could set the bar to a certain size. In my case i want to compare a double cell value against another cell show by how much one value bigger than the other in relative percentage terms, i want to represent this info as a data bar on the cell background (something how "unit stocks" column in the first screenshot in the above link depicts).

I can probably do that with a rectangle and a custom style, but if there is already pre built style with xamgrid then it would make it easier. Could you please give me a hint or an example if possible how i can leverage?

Parents
No Data
Reply
  • 17475
    Offline posted

    Hello Rohit, 

    The ConditionalFormatting is functionality that is provided with the XamGrid and could be used directly, no need add rectangles and custom styles to the cells. In the attached project DataBarConditionalFormatting rule is applied for a column that contains int values. The bar width is a visual representation of the value. If the value is low, the bar is smaller. You could change the look of the bar using properties like DataBarDirection, DataBrush, etc.

    Please feel free to let me know if this is what you are looking for or I have misunderstood something in your scenario.

    XamGridCondFormat.zip
Children