I've spent more time on this than I wish and now I'm at a point of desperation. I've got an issue with borders and I know ultragrid and borders don't play well. I'm able to get the borders to appear how I would like except when the mouse is pressed on the cells that has a border on it. It's difficult to explain without seeing it. I've attached a video of the problem and I'll try and attach the project later. In the video, it's not obvious but the mouse button is clicked on the that has a right border. When it is pressed, the right border disappears, then reappears when the mouse button is released. The cells that have a left border don't have this problem. Both borders are drawn by setting the Column.CellAppearance to Black.
Is there another property I need to keep the border black?
Hello Aaron,
Thank you for posting in our forums!
Based on the attached video and project sample, I assume the edit mode of your second column`s cells overlaps the left border of the neighbor cells, that escalates to undesired effect. I see in your code incomplete draw filter class implementation, which is one of the right ways to accomplish the appearance you are looking for. So I have edited your project, in order to show you example implementation of the draw filter class. You can read more about draw filtering on the following documentation page: http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/HTML/Win_Draw_Filter.html
Another workaround related to your issue is to set custom appearance to all of your cells, when they are in edit mode. The next code snippet handles the initialization event of the UltraWinGrid and set the border color of the cells in edit mode to black.
private void VotingGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e) { e.Layout.Override.EditCellAppearance.BorderColor = Color.Black; }
If you need any further assistance or I am missing something, I will be glad to answer your questions.
Thanks Ivaylo,That does give the desired result but now I see the focus rectangle which is why I added the drawfilter class originally. Is there a way to remove the focus rectangle and still have the border show up when it's being edited? Here is the link to removing the focus rectangle.
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=4791
I am checking about the progress of this issue.
Please let me know if you need any further assistance or I am missing something.
Thank you for using Infragistics Components.