How to show textboxes with a value dynamically when the data increases?

  • Thread starter Thread starter samiarja
  • Start date Start date
S

samiarja

Guest
I have a JSON file with multiple string values as shown below:

[
{
"Record": 1,
"IPaddress": "192.168.6.247",
"Machinename": "taurus",
"username": "root",
"password": "root",
"sourcefolder": "/home/root/conf",
"destfolder": "D:/DataProfiler_Nautitech/Files",
"filextension": ".json",
"removedownloaded": 0
},
{
"Record": 2,
"IPaddress": "192.168.6.247",
"Machinename": "taurus",
"username": "root",
"password": "root",
"sourcefolder": "/home/root/data/completed",
"destfolder": "D:/DataProfiler_Nautitech/Files",
"filextension": ".db",
"removedownloaded": 0
},
{
"Record": 3,
"IPaddress": "192.168.6.247",
"Machinename": "taurus",
"username": "root",
"password": "root",
"sourcefolder": "/home/root/data/",
"destfolder": "D:/DataProfiler_Nautitech/Files",
"filextension": ".db",
"removedownloaded": 0
}
]

The JSON is linked to a C# windows form application that read from the JSON file and deserialize it.

On the application interface, the machinename and IP address are shown with a progress bar and a label.

Sometime the JSON has 10 record or maybe 1 record, therefore, the application should shows texboxes depend on how many JSON strings there are. I tried the brute force way and I hard coded it, but the application works for minumum 4 records, and when the operator has only 1 record this will create some issues.

Any thoughts on how to implement this dynamic textboxes method.

Thank you so much in advance.

Continue reading...
 
Back
Top