Hi
We have a large number of tables and we need to perform data entry on such tables, but without creating a separate data entry form for each table if possible. Is there a way whereby we pass a table name and a few field names in the table to a form and the ultragrid on the form binds itself to the table and its fields allowing us a quick data entry option?
Thanks
Regards
What I do to make this dynamic is to create a table called metaColumns that holds information about the tables and columns I want to view. In the Initialize layout event I first loop through all columns setting them hidden. Then loop though the metaColums table to show those appropriately and in the positional order wanted. Also have much more information in the meta table. Field length, column caption, input mask, etc.
Nick
At what point do you bind the table to the grid so in Initialize layout event the columns are accessible?
In my case users are selecting the particular data they want to see from a winexplorer menu.
Control is transferred to a grid where users can enter selection parameters to be fed to the stored procedure that returns the data based on criteria users want to see. Once parameters are entered the users select a toolbar button called retrieve. On the toolbar click the stored procedure is run and returns a table and at that time the table is assigned to a bindingsource and bound to the grid. Inside the InitializeLayout event which is then fired any manipulation of the columns, etc. is done. The metaTable information about the columns was previous read in when the program started and is utilized during the event.
Hope this helps some.