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?
Hello Rohit,
After further investigation on the matter this is determined to be a new product idea since the ConditionFormatting is only applied to the cell value. The bar value could not be changed externally. You can suggest this as new Product Ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
Steps to create your idea:
The benefits of submitting the product idea yourself include:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Sorry do not mean to push, but appreciate if you could confirm if this is a bug or otherwise could you suggest why the setter is not applied as intended.
Thanks
(Refer to attached sample)
To show the bar in relative terms i used the BarPercentage property but apparently it seems it is not used
Issue #1
On line 45 of .xaml.cs I am specifying the BarPercentage property to 50, when i apply the cell style it some how does not apply.
Issue #2, comment Issue #1 region and uncomment Issue #2 region
To implement what i described in the previous example i came up with this solution. Can you help explain why this conditional format is not applied at all? Is it a bug or am i doing something wrong?
Thanks,
Rohit
Hi Maria,
I am sorry what you described is what i could see in the samples and the link i gave above as well.
As i explained previously What I want is to show the Bar in "RELATIVE TERMS" i.e. as a percentage and not the value itself.
For example if i have two columns Age and MaxAge, I want to show by how much (relatively) Age exceeds MaxAge (if it does not exceed that conditional formatting should not be applied), i want to plot this in relative percentage as a bar graph on the Age column
see attached screenshot
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.