Create and Fill Grid with Appended Number
Posted on 2009-05-05
I have a tabcontrol with 6 tabs and lots of grids on each tab.
Being from the VB 6 control index era, I named each control the same except appended a number to the end to correspond with the index of the tab. In VB 6 they would all been named the same, but with different indexes. It would have been very easy to fill the info.
Tab 0 Index controls
Tab 1 index controls
I originally thought I could just send the index of the tab selected and append it to the name of the grid to be able to fill them.
Dim fGrdRear as FarPoint.Win.Spread.FpSpread = fGrdRear & tabindex
but that doesn't return the grid.
I don't want to create the same procedure a bunch of times in order to fill each tabs controls.
What would be the best way to fill the grids? There are about 12 grids on each tab.