>>Hi everybody,
>>
>>I want to subclass a DataGrid control (in .NET CE) environment. In particular, I want to have a common property _rowNumber and a common MouseUp event updating this number.
>>
>>This part I was able to figure out myself.
>>
>>Now, in addition I also want to have TableStyle as a property (can I use SET/GET the same way as with a regular property?) and a new signature for a method FormatGrid. The actual implementation of this method I'd like to have coded in the form.
>>
>>So, can you please just tell me what would be the syntax here to declare this method in C#?
>>
>
>You can't create a method in your subclass that can be overridden in the form. However, you can create an event that you can bind to a method in your form.
Yes, I figured this - I guess I still have VFP mindset where this would be an easy thing to do.
I used my original logic but now I was accessing grid's property and thus both my grids were formatted OK, e.g. I didn't use grid's method, I used form's method but was accessing grid's property instead of form's property.
If it's not broken, fix it until it is.
My Blog