Help with creation of derived DataGridColumnStyle Class
Hi
Basically i need to show all horizonal gridlines and only show the vertical gridlines where specified within a datagrid
i.e. The first column has a line on the left hand side but not on the right and the second column has a line on right but not on the left.
As far as i can tell there is no "standard method" for achieving this formatting.
Looking at msdn documentation it demonstrates how you can create a derived DataGridColumnStyle (the example given is of a style that hosts a date time picker).
So my initial thoughts are simply to turn off the gridlines
and then by Overriding the Paint method draw a line vertical (on the left or right) and a horizontal line (bottom) based on the bounds of the cell.
Does this sound like a sensible idea? or am i basically attempting to open a can of baked beans with a chainsaw? Is there a 'more simple' approach?
The documentation also informs me that i am required to override the ABORT, Commit and Edit members?
Quote:
EDIT - Prepares the cell for editing a value.
COMMIT - When overridden in a derived class, initiates a request to complete an editing procedure.
ABORT - When overridden in a derived class, initiates a request to interrupt an edit procedure.
Any idea's how i would use these within my derived class? This is where i get a bit confused as i don't really want to change any other functionality apart from the custom drawing of lines within each cell.