Click here to Skip to main content
15,916,846 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

My project to Generate Dynamic Forms for Microsoft SQL Server 2008 Catalogs is just about finished. The problem I now have to solve is: "How do I update the database from a specific dataset?"

My application generates a tab page containing all necessary controls and places them onto a Table Layout Panel control. Each tab page contains a binding navigator control and a binding source control, which in turn binds specific controls to specific columns(fields) of the database table. This allows the binding navigator control to function.

My problem comes from the fact that whenever I generate a new tab page a new dataset is generated for that table. For example: In my Northwind database I can generate tab pages for both the Employees and Products tables. My form will show tab pages for both of them and I can make changes to the dataset in each without any problems.

Here is the noggin scratcher: The binding navigator control and the Save button on it are generated dynamically for each tab page . I need some way to distinguish the Employees dataset from the Products dataset when the Save button is press so the proper table on the database gets updated.

Does anyone have any idea how this can be done? I have searched the Internet and couldn't find anything remotely similar to my problem.

Thanks in advance,
MRM256
Posted
Comments
Winston Madiano 24-Jul-13 20:38pm    
as you generate the save buttons you can set the name and add handler to it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900