Designer support for DataSets

J

J

Hi,

I'm trying to get designer support in Compact Framework 1SP2 to work.
I check the v2 beta and there doesn't seem to be any support
forthcoming.
What I want is to see at designtime how the bindings in the controls
are set. The equivalent in a regular .Net application of the little
keys beside the property and the DataBindings collection.

In a perfect solution I would add a new designer to Data* classes and
Forms-controls so the properties are exposed and there is no
difference anymore between CF and desktop. The designers should
produce native CF code of course.

I'm sort of half way there. I created a derived control (CheckBox)
which exposes the DataBindings and has the browsable attributes set. I
can then see the bindings and manipulate them. However when I try to
set a property it gives an invalid cast. Most likely it calls the
baseclass Binding, which has no design support. I could continue along
this road, but then I would create a complete shadow implementation of
CF. Definitely too much work.

How much work would it be to add design time database support to the
CF framework?

Or how to add a custom designer to an existing class?

Any suggestions or ideas will be welcome.

J.
 
I

Ilya Tumanov [MS]

There is no Data/DataBase designer support in V1, but there will be in V2.
You will be able to create connection to a database, create typed DataSet
or ResultSet (new cool class) and bind it to a control at design time.

As to how much work would it be to add such support to V1, my estimate
would be about 5 man years for fully blown implementation.
Limited functionality might be done a lot faster.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
J

J

Full support would be too much to ask, but 2005 is too long to wait
for CFv2.

Subclassing some controls for designer support is do-able and well
documented. There are two things I'm still having problems with.

1. Make VS recognize an object as a valid DataSource, or make a
DataSet a visual component in design mode.
The first has an equivalent in webcontrols (IDataSourceProvider), but
this doesn't work with the DataMemberConverter in the
System.Forms.Design namespace. I can't find any info on how this
editor determines the valid datasources, nor a reference to some
documentation on this editor.
The second is a problem, since a DataSet is disabled in the ToolBox
for CF. My guess is there is a ToolBoxFilter set to Prevent or
something.

2. Codegeneration. The CodeDomSerialzer is unknown in CF for some
reason. I must be doing something wrong, since the design part is done
by regular .Net, including codegeneration. Creating the DataBindings
in a seperate generator class is preferable to letting the components
do it themselves from within specialized methods or setters for some
of their properties.

Do you know any documentation to give me a push in the right
direction?

J.
 

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