Take for example some simple desktop (windows) database app with 30-50
tables. Most forms for entering data are similar and have some form of
DataGridView with buttons for Insert/Update/Delete/Sort/Filter/Print/...
Forms for Insert/Update have many fields and some buttons like OK and
Cancel.
Generating every new form from zero with form designer and drag and drop is
very hard. Even the old xBase tools had frameworks for automatic generating
of code for all forms (even the complex ones) with the need for only small
changes after. What I want to say is that using the form designer at all is
the step back.
How you people do this, make every new form from zero or have some kind of
automatism.
Petar
> I started developing in C#. Is there any elegant solution for
> automatic generating of forms based on the structure of the tables in
> (MSSQL) database (database schema), and after that only making minor
> changes in generated code for specific things. [...] Most forms for
> entering data are similar and have some form of DataGridView with
> buttons for Insert/Update/Delete/Sort/Filter/Print/...
Why not have *one* form with a DataGridView, and create new copies of it
bound to different tables?
Eq.
You have at least two options, user controls and inherited forms.
http://msdn.microsoft.com/en-us/library/system.windows.controls.usercontrol.aspx
Sorry I could not find a link to inherited form on MSDN, however it is in
the items from the project when you right click on that.
Cor
"Petar Djetlic" <petar....@gmail.com> schreef in bericht
news:g0920a$rqv$1...@ss408.t-com.hr...
"Cor Ligthert[MVP]" <notmyfi...@planet.nl> wrote in message
news:A12E2BCF-7EC9-438F...@microsoft.com...