I want to use a webprogressbar as a template field in a webdatagrid, and part of the template is to style the color of the progress bar according to the data within that record. I can see how to use a page style to change it for every record, is it possible to change the color based upon data?
Thanks.
Hello Rick,
Rick Langel said: So I have to use a pre-defined list of colors in order to have the css classes defined ahead of time? Not possible to use data?
So I have to use a pre-defined list of colors in order to have the css classes defined ahead of time? Not possible to use data?
Yes. That's the only approach I could make it work with WebProgressBar.
Best regards,Martin PavlovInfragistics, Inc.
I can make it work, I just want to verify.
Rick
You can use WebProgressBar CssClass option to assign each templated progress bar a CSS class that is specific for your data record (for example using a data binding expressions).
Then define CSS styling for the different classes used in the templated progress bars like this:
<style>
.warning .igpb_Fill_Horiz.igpb_InnerDiv {
background-color: yellow;
}
</style>
where "warning" is the CSS class applied to the CssClass property of a WebProgressBar.