I am very new to the UltraWinGrid. I have figured out the basics of using the grid with C# but now I am working on some formatting issues. I need to have the grid draw all of the cell borders as normal but I need to have a thick vertical border line between the 2nd and 3rd column. It doesn't seem that this is very easy to do. Perhaps I am missing something. Thanks for any info you can give me.
Hi,
It might help me point you in the right direction if I knew the purpose of this thick vertical line. Is this just a separator? Do you want to make the columns to the left of the line fixed? Are you trying to split the grid?
It is just a vertical separator.
stevendm said:It is just a vertical separator.
There's no easy way to do that, in fact. It would be easier if you want to make some columns fixed, because the grid has support for a separator between the fixed and unfixed columns. But there's no support for adding an arbitrary separator between two columns.
I recommend that you Submit a feature request to Infragistics.
That doesn't mean it cannot be done, of course. :)
One way you could achieve this would be to add an unbound column to the grid. You could insert these column in the position where you want the separator. You would disable editing in this column and apply an CellAppearance and perhaps a HeaderAppearance to make it look like just a solid block. And, of course, you would set the Width so it looks like just a separator.
I'm using infragistics 11.1.20111.2009 and I wonder if there's a proper way to do this or we still need to work-around with the dummy column...
If it's the former please point me to the Properties/Methods to use.
If it's the latter (and I guess it is), please could you provide a code snippet to do this ?
I've tried the described approach (see the attached VS2008 zipped solution), but the result is not the one I expected (there are still horizontal lines, separator header is still let's say "3d" and it highlights when hovering etc..)
My actual need is to highlight the separation between groups, but I think it is basically the same as between normal columns.
Thanks in advance,
Regards
N.B.
I'd like to create a dummy black column that is independent from the OS theme or from the skin used. In the code attached I have set the width to 7 pixels just to show the effects better.
Hm, it looks like this is a bit more complicated than I thought.
The only way I could get this to work cleanly is using a RowLayoutStyle of GroupLayout and also using a DrawFilter to draw the cells of the separator column, headers, and group headers completely black.
I also had to turn off 3D borders and turn off the row borders.
I'm attaching an updated version of your sample here and I commented all of my changes with "***" so you can see what changes I made.
Great !
Thanks a lot for your help Mike :)