Cap'nKirk 10 Still Wearing L Plates

Hi,

I have many controls that are created at runtime and I have managed to figure out how to skin these using SkinFramework apart from a DataGridView control that I have.

One column of my 'DGV' is a button column and it is this that I am trying to skin.

The piece of code below is what I have been using for the other controls but I am missing something with the 'DGV' as it will not except 'Handle'.

The column name of my 'DGV' I am trying to skin is 'Code'

skinFramework.ApplyWindow(Code.DataGridView.Handle.ToInt32());

Here is the exception:-

'System.Windows.Forms.DataGridViewButtonColumn' does not contain a definition for 'Handle' and no extension method 'Handle' accepting a first argument of type 'System.Windows.Forms.DataGridViewButtonColumn' could be found (are you missing a using directive or an assembly reference?)

Any ideas on this would be welcome.

Kind regards..,

MT ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.