Change selected cell border

May 28, 2009 at 3:09 AM


I'm sorry if this question had asked before.

How to change selected cell border with another color and another style (dot, dash, etc)?

Which method in the source code did this exactly?


Thank you.



May 28, 2009 at 6:35 AM

There should be somewhere a "Border" property from a cell. Might be something like this myCell.View.Border

May 28, 2009 at 10:18 AM

Yes it was there..

SourceGrid.Cells.Views.Cell  viewNoBorder =new SourceGrid.Cells.Views.Cell();

  _viewNoBorder.Border = New DevAge.Drawing.RectangleBorder(DevAge.Drawing.BorderLine.NoBorder);
 grid1[row, 2].View =


But, this is not what i want. I want something like owner-draw-border, changing color and style. Can you help me?


Thank you


May 28, 2009 at 11:13 AM

Take a look at sample 3 , you can get your need (Custom Border , Custom View , ...)

Jun 1, 2009 at 10:56 AM


Thanks for the fast response. Any ideas how to create dash-dot border?


Jun 1, 2009 at 3:40 PM
Edited Jun 1, 2009 at 3:50 PM

It is easy , look you can create one specific border or more for the cell'rectangle then use them as your choice ( if you taked a look for the form 3 , you see you can create a border , specify it as dashDot , DashDotDot  ... , as you like :) )

this is a simple example

 BorderLine _Border = new BorderLine(Color.Red, 5);
  _Border.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDot;

Jun 2, 2009 at 3:23 AM


Thank you. I'll try.