Deriving from DataGrid question

P

P

Hi.
Im interrested in extending some functionality on the DataGrid class. There
are only a few features im trying to implement but my question is:
Can I derive a class from DataGrid and if so can I still acchieve design
time functionality? Or do I have to put all initialization code previously
found
in InitializeComponent() after the form makes its call to this method? Im
just wondering about how to extend functionality on controls in the Compact
Framework.

Regards

<P>
 
P

Peter Foot [MVP]

If you want to use the existing design time support but want to add extra
functionality (I guess to a certain extent it depends on exactly what you
want to do) then another alternative is to write a helper class to which you
can pass the datagrid and then perform operations on.

Peter
 
P

P

I currently have implemented a sort functionality that looks if a
columnheader was clicked and the sort the underlying DataView.
Perhaps in the future I would like to have other extensions also on the grid
but what would be the best approach in your mind then to implement this. Not
pretty to write the same piece of code in all forms with the DataGrid. A
gridhelper class or deriving if it´s possible.

<Regards>

P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top