User (Old forums)MemberNovember 17, 2009 at 9:37 amPost count: 23064
In my grid, I change the BackColor and ForeColor of some cells to bring attention to them, making some bright red cells. At first I had problems when a row was selected, because the row selection colors would hide the bright red cells. Then I found I could get around this by making the SelectionBackColor semi-transparent using the color’s alpha value. Things were looking acceptable until I needed to use a custom control in a CellEditorManager and CellViewerManager. Now when I select the row, the custom control doesn’t look right. The BackColor and ForeColor are being set but not to the correct colors. It looks like the bright red BackColor of the grid’s cell is lost, and the custom control’s BackColor is being set to ONLY to the SelectionBackColor, not the “blend” of bright red and the SelectionBackColor.
You can see this behavior without even changing the BackColor of some cells. If you use a WinTextBox for one of your columns (and leave some other columns alone):
gridControl1.DataRowTemplate.Cells[“YourColumn”].CellEditorManager = new Xceed.Grid.Editors.CellEditorManager(new Xceed.Editors.WinTextBox(), “Text”, true, true);
gridControl1.DataRowTemplate.Cells[“Region”].CellViewerManager = new Xceed.Grid.Viewers.CellViewerManager(new Xceed.Editors.WinTextBox(), “Text”);
And in your stylesheet try these on different runs:
styleSheet.Grid.SelectionBackColor = Color.FromArgb(255, Color.DarkCyan);
styleSheet.Grid.SelectionBackColor = Color.FromArgb(40, Color.DarkCyan);
When you use a 255 alpha, that’s a solid and so every cell in the selected row changes to that color. When you use 40 alpha, the regular cells will have their BackColors “blended” with the SelectionBackColor. But the WinTextBox cell is just the solid “255 alpha” SelectionBackColor.
What can I do to get what I want? I am very open to changing how I do things if it will get me the results I want. Should I be taking a different approach altogether?
Imported from legacy forums. Posted by Buzz (had 1965 views)User (Old forums)MemberDecember 9, 2009 at 10:35 amPost count: 23064
And support on this will be appreciated.
Imported from legacy forums. Posted by Buzz (had 395 views)User (Old forums)MemberDecember 14, 2009 at 1:57 pmPost count: 23064User (Old forums)MemberMay 28, 2010 at 3:28 pmPost count: 23064
Can you post the solution on the forum here? I am running into similar issues where the stylesheet doesn’t always apply to Win controls, similar to what this user was experiencing. Thanks!
Imported from legacy forums. Posted by Mac (had 225 views)User (Old forums)MemberMay 28, 2010 at 4:03 pmPost count: 23064
Mac, After 6 months it’s all pretty fuzzy.
Back in December, I spent a few hours creating a sample app to send to Xceed. But the reply back was that it would be too much work for them because I didn’t have “Vanguard support”.
I did end up working through my problem, but I remember it being ugly/unsatisfying. I may be able to dig it up, but I don’t have access to my code today. The next chance I’ll have is on Tuesday. I’m not sure it will do what you want, but email me on Tuesday to remind me if you can’t figure things out by then. gmail account: buzzweetman
Imported from legacy forums. Posted by Buzz (had 379 views)Xceed SupportMemberMay 31, 2010 at 2:01 pmPost count: 5658
Please post your self contained sample and the requirements you intend to implement or the situation you are facing. We will then be glad to resume the investigation. Thank you.
Imported from legacy forums. Posted by Mohamed [Xceed] (had 1295 views)
- You must be logged in to reply to this topic.