SubClassing DataGrid control

  • Thread starter Thread starter Jason Duffield
  • Start date Start date
J

Jason Duffield

Hello all,

After much research I discovered how to use the System.CF.DLLs in order to
subclass for the .NET Compact Framework and have them appear as design time
objects to be placed on forms, but with one exception...the DataGrid
control.

I have the DataGrid control subclassed, and it appears in the General
Toolbox, but it is grayed out. All my other subclased controls appear and
are drag-and-drop-able in design time.

Any thoughts about how to enable the sub classed DataGrid as
drag-and-drop-able?

-> Jason
 
Make sure that you have included
Designer\System.CF.Windows.Forms.DataGrid.dll in you compileDesign.bat
file otherwise it will be grayed out (as you described). For example:

csc.exe /noconfig /define:DESIGN ... /r:"C:\Program Files\Microsoft
Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\Designer\System.CF.Windows.Forms.DataGrid.DLL"

Best regards,
Sergey Bogdanov
 
I have made sure that the System.CF.Windows.forms.DataGrid.DLL is in the
..BAT file. I then rebuild my subclass project, and run the new batch file
and when I add the resulting DLL to my tool bar, the datagrid control is
still grayed out.

I must be missing one small step, but all my other controls which are done
the same way are drag-and-drop-able.

-> Jason
 
Sergey,

Thanks a bunch for the help. Not only did I need to add the .BAT update,
but I did not have the System.Data.DLL referenced in the design time
project. All is working great now.

Thanks again,

-> Jason
 
Back
Top