Home Forums WinForms controls Xceed Grid for WinForms Performance comparisons? Reply To: Performance comparisons?

User (Old forums)
Post count: 23064

To use the subclassed cells, your subclassed row should create them, like this:<code>public class MyDataRow : Xceed.Grid.DataRow
public MyDataRow() {}
public MyDataRow(MyDataRow template):base(template) {}
protected override Row CreateInstance() { return new MyDataRow(this); }
<b>protected override Cell CreateCell(Column parentColumn) { return new MyDataCell(parentColumn); }</b>
And the subclassed cell should at least look like this:<code>public class MyDataCell : Xceed.Grid.DataCell
public MyDataCell() {}
public MyDataCell(MyDataCell template):base(template) {}
public MyDataCell(Column parentColumn):base(parentColumn) {}
protected override Cell CreateInstance() { return new MyDataCell(this); }
}</code>Then, in your subclassed row- and cell-classes, you can override the necessary methods.
You can find more information about extending Xceed.Grid classes in the documentation that comes with Xceed.Grid (Advanced Concepts > Extending the grid’s classes), or in the online documentation: <a href=”http://doc.xceedsoft.com/products/gridNET/doc/sources/extending.htm”>http://doc.xceedsoft.com/products/gridNET/doc/sources/extending.htm</a&gt;.

Imported from legacy forums. Posted by Tommy (had 294 views)