Home › Forums › WinForms controls › Xceed Grid for WinForms › Performance comparisons?
-
AuthorPosts
-
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>
}</code>
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>.Imported from legacy forums. Posted by Tommy (had 294 views)
Sorry fellas – I’ve done this subclassing as well and while I am certain there is a performance increase, it’s incredibly small. Any grid (databound or otherwise) with a large number of rows will act “sluggish” when bring scrolled.
I wish this were not the case as this is by far my favorite grid control…but there it is. If you want a powerful grid, this one’s for you but dont expect high-speed display updates (at least not at this time.)
-LK
Imported from legacy forums. Posted by Curtis (had 663 views)
Tommy,
I wanted to give this a go, but I’m having some troubles. I have a class that inherits GridControl, but PaintBackground is not a method available to be overridden.
Kelly Smith
Imported from legacy forums. Posted by Kelly (had 757 views)
Here is a <a href=”http://www.xceedsoft.com/cs/download/XceedGrid/CSharp/Custom Row Cell Derivation.zip”>sample application</a> that shows how to do this. You need to extend both the Row and Cell classes to use custom cells.
This sample is in C# VS2003, using grid version 3.X.
Here are more details from the online help documentation :
<a href=”http://doc.xceedsoft.com/products/gridNET/doc/sources/extending_the_cell_class.htm”>http://doc.xceedsoft.com/products/gridNET/doc/sources/extending_the_cell_class.htm</a>
<a href=”http://doc.xceedsoft.com/products/gridNET/doc/sources/extending_the_row_class.htm”>http://doc.xceedsoft.com/products/gridNET/doc/sources/extending_the_row_class.htm</a>Imported from legacy forums. Posted by André (had 12190 views)
-
AuthorPosts
- You must be logged in to reply to this topic.