Hi Guys.
I´m trying to store some parameters for my application on a database table. The table contains multiple rows which contains a Key -> Value relationships. On my windows forms program (written in C#) I have multiple controls that should allow the user to interact with the stored configuration on the database.
For example, my database table looks like the following:
id option_name option_value
1 serial_port_baudrate 9600
2 serial_port_stopbits one
On my form I have controls that allow to change those values. After some research I've obtained the expected results using the bindingSource
class and the filter
property. But I have to create a bindingSource object for each textbox using the visual editor. Can you please help me to archieve this with multiple textboxes and controls without using the visual editor?
I dont know if it´s possible but I would like to code a solution where I could just name the textboxes on my form with the same name of the Key that holds the value in the database and then they would get the correct values when the application runs. I would appreciate any information or hints you could provide.
Thanks in advance.