I have a form with a series of groupBoxes . Each groupBox represents a station and contains various controls related to that station. Each station has a serial number associated with a device connected to that station (i.e. It's always changing). This serial number is stored in a database that holds all information relevant to that station.
Basically I want to be able to databind each serial number textBox to a particular cell in the database (there are other controls that this needs to be done to but I'm starting with the simplest). For example, for station 1, the serial number exists at
this->TBCalDataSet->stations[0][2]
I can set it manually by
this->st1BuckSer->Text = Convert::ToString(this->TBCalDataSet->stations[0][2]);
but when I get to the rest of the controls, it's well over 100 iterations of setting the properties. I can't really use a for loop because one of the controls is a check box and using a pointer, I can't change the checked status. If I have to, I can place it all in a separate function and call it when I need it, but I was hoping that there would be a simpler way. I also think it would be spending a lot of time in that function.
So can I databind a textBox to a cell in a dataset... or even array (dataset preferred)? Or should I do it manually?
Thanks in advance