. SQL, datagridview win- ( , ).
, , , , , , .:-)
( 1-2 MS)
1. , DataGridViewColumn DataGridViewCell, ;
2. "CustomEdit"
- , , , DataRow , , . .
:
public partial class MyCell : DataGridViewCell
{
protected override void Paint(...)
{...}
public override void InitializeEditingControl(...)
{...}
public override Type EditType {
get{
return typeof(MyEditControl);
}
}
public override Type ValueType{
get{
return typeof(MyItem);
}
}
}
:
public partial class MyColumn : DataGridViewColumn
{
public MyColumn(){ ...
CellTemplate = new MyCell();
}
}
:
public partial class MyEditControl : UserControl, IDataGridViewEditingControl
{...
}
, List <MyItem>
public class MyItem:Object{
...
[XmlIgnore]
public MyItem Self {
get {
return this;
}
}
}