User (Old forums)MemberApril 24, 2007 at 12:49 amPost count: 23064
how can i apply alternate colors to the gridcontrol.
Imported from legacy forums. Posted by rajendernag (had 8526 views)Xceed SupportMemberApril 24, 2007 at 8:49 amPost count: 5658
Can you be a little more specific on what color you want to change?
Imported from legacy forums. Posted by Marcus [Xceed] (had 5146 views)User (Old forums)MemberApril 30, 2007 at 3:34 pmPost count: 23064
I think the question refers to the ability to specify an Alternate Row color, similar to the .NET 2.0 DataGridView control. That control allows an Alternate Row color to be set, as well as a default row color. The row background color then alternates with each row.
In other words, Row 0 has a white background, Row 1 has a gray background, Row 2 has a white background, Row 3 has a gray background, etc…
I know that you can set cell styles, but I also have the same question as the orginal post — can the alternating row colors be set without a lot of code to dynamically determine whether the row is odd or even?
Imported from legacy forums. Posted by Todd (had 1108 views)Xceed SupportMemberApril 30, 2007 at 3:57 pmPost count: 5658
We implemented something in version 1.1 to easily allow alternating “stuff” through triggers.
Version 1.1 will be soon available… (beginning of May)
Other than the trigger code, all that will be needed is a converter that convert an index into whatever value you want to trig on (allowing complex patterns).
Imported from legacy forums. Posted by Marcus [Xceed] (had 3729 views)User (Old forums)MemberJune 10, 2008 at 2:20 amPost count: 23064
Please let us know if this feature has been released now. This is a critical functionality for us to finalize the xceed grid evaluation.
Raja S L N
Imported from legacy forums. Posted by Raja (had 1024 views)Xceed SupportMemberJune 10, 2008 at 8:20 amPost count: 5658User (Old forums)MemberJune 10, 2008 at 10:02 amPost count: 23064
If you wanted to let the user turn this on and off with perhaps a checkbox. How would you go about this? Also if you wanted to let the user select the colors would you have to do it all programmatically?
Imported from legacy forums. Posted by Dave (had 455 views)Xceed SupportMemberJune 10, 2008 at 11:13 amPost count: 5658
While I am not sure there are nice 100% code-less approaches to scenarios such as the one you described, there are ways to preserve a nice separation between look and feature.
The DataRow implicit style defined can use DataTriggers that are bound to properties defined on the Page/Window/UserControl ( RelativeSource FindAncestor ). These properties could enable/disable the alternate row coloring as well as configure its color. In this case, the Enabling property as well as the Coloring properties could be considered as features of the Page/Window/UserControl while the way to select them, display them and affect them on the DataGrid remain on the look side of things ( XAML-only ).
Imported from legacy forums. Posted by Marcus [Xceed] (had 877 views)User (Old forums)MemberFebruary 12, 2009 at 10:33 amPost count: 23064
How can i apply alternate colors on runtime?
I want to give provision of a toggle button on check state i want to give alternate color (say Green) on unchecked state i want to remove thealternate color…
I want to do this in my Code behind..
Imported from legacy forums. Posted by arya009 (had 5077 views)Xceed SupportMemberFebruary 16, 2009 at 12:24 pmPost count: 5658
You can bind the IsAlternatingRowStyleEnabled property of the TableView class to the IsChecked property of the check box that will enable or disable the alternating styles.
Imported from legacy forums. Posted by Jenny [Xceed] (had 5075 views)User (Old forums)MemberFebruary 25, 2009 at 4:09 amPost count: 23064
Do u have any sample code for the alternate colors for using it on a gridcontrol?
GridControl1….. > no property IsAlternatingRowStyleEnabled
Imported from legacy forums. Posted by Insider (had 834 views)Xceed SupportMemberFebruary 25, 2009 at 8:11 amPost count: 5658
The IsAlternatingRowStyleEnabled property is defined on the TableView class and not on the DataGridControl class.
TableView view = new TableView();
view.IsAlternatingRowStyleEnabled = true;
dataGridControl1.View = view;
Imported from legacy forums. Posted by Jenny [Xceed] (had 5295 views)
- You must be logged in to reply to this topic.