V
Vagabond Software
I am creating a custom datagrid based, in part, from someone else's code. The author declared a derived datagrid class in a windows form, then declared a derived ColumnStyle class, in the same form, that accepted his custom grid type as an argument. For example:
public class HisCustomGrid : DataGrid {
public HisCustomGrid() { } }
public class HisColumnStyle : DataGridTextBox {
public HisColumnStyle(int anyint, HisCustomGrid grid) { } }
I now have a Windows Control Library with all the features I need, but I still need to include the column styles. I'm not sure how to go about doing this.
1. I think the 'right' way to go would be the columnstyles as a nested class within my custom datagrid class, but I'm not sure how to direct the columnstyle to my grid. For example:
public class MyCustomGrid : DataGrid {
public MyCustomGrid() { }
public class MyColumnStyle(int colIndex, ???what here???) { } }
2. I assume the other option is to add it as a separate class within my Windows Control Library namespace, but I still don't know how to make it act upon my custom grid. For Example:
namespace MyCustomGrid {
public class MyCustomGrid : DataGrid {
public MyCustomGrid() { } }
public class MyColumnStyle : DataGridTextBoxColumn {
public MyColumnStyle(int colIndex, ???what here???) { } } }
Any help would be greatly appreciated.
- carl
public class HisCustomGrid : DataGrid {
public HisCustomGrid() { } }
public class HisColumnStyle : DataGridTextBox {
public HisColumnStyle(int anyint, HisCustomGrid grid) { } }
I now have a Windows Control Library with all the features I need, but I still need to include the column styles. I'm not sure how to go about doing this.
1. I think the 'right' way to go would be the columnstyles as a nested class within my custom datagrid class, but I'm not sure how to direct the columnstyle to my grid. For example:
public class MyCustomGrid : DataGrid {
public MyCustomGrid() { }
public class MyColumnStyle(int colIndex, ???what here???) { } }
2. I assume the other option is to add it as a separate class within my Windows Control Library namespace, but I still don't know how to make it act upon my custom grid. For Example:
namespace MyCustomGrid {
public class MyCustomGrid : DataGrid {
public MyCustomGrid() { } }
public class MyColumnStyle : DataGridTextBoxColumn {
public MyColumnStyle(int colIndex, ???what here???) { } } }
Any help would be greatly appreciated.
- carl