Theseekers
Technical User
Hi Tekers,
I really don't know how to put phase this question but here I go.
I have a data class that allow me to load a record in it so I can manipulate fields that I want. I need to put these fields into a loop so that I don't have to address them individually but I really don't know how to do this. Can some one offer me a suggestion on this.
Here is an example of what I would like to accomplish.
Currently I get to each field in the record by:
mydatarow.item("Field#")
so either to set or assign value I would do:
As you can see, I have or will have some 50 or 60 fields to do this and just want to find out a better ways to loop through them, but I am stucked
How can I substitute the field object name between the ( ) so that I can substitute the # using index of a loop.
My altimate goal is to get something like this
for lcv = 1 to 50
mytextbox(lcv).text = mydatarow.item("Field(lcv)".ToString
next
Thank a million in advance.
P.S. I know how to get to mytextbox by using findcontrol method but don't know how to do smilar thing to the mydatarow.item object.
I really don't know how to put phase this question but here I go.
I have a data class that allow me to load a record in it so I can manipulate fields that I want. I need to put these fields into a loop so that I don't have to address them individually but I really don't know how to do this. Can some one offer me a suggestion on this.
Here is an example of what I would like to accomplish.
Currently I get to each field in the record by:
mydatarow.item("Field#")
so either to set or assign value I would do:
Code:
mytextbox1.text = mydatarow.item("Field1").ToString
How can I substitute the field object name between the ( ) so that I can substitute the # using index of a loop.
My altimate goal is to get something like this
for lcv = 1 to 50
mytextbox(lcv).text = mydatarow.item("Field(lcv)".ToString
next
Thank a million in advance.
P.S. I know how to get to mytextbox by using findcontrol method but don't know how to do smilar thing to the mydatarow.item object.