|
-
May 12th, 2002, 10:08 AM
#1
Thread Starter
New Member
FlexGrid question..pls answer
I am using a MS Flex grid control . I am loading around 2000 records into the grid from database.
After loading all the records (2000 records), (After loading when I look at the records in the GRid they look fine.)
I am iterating thru each row in the grid. after iterating thru first 70 rows (I am using a FOR statement to iterate, suddenly, the FOR loop picks up the first record in the grid while it is supposed to pick up 71st record.
Is there any limitations in iterating thru the rows of a MSFlex grid control?
Any suggestions how to solve this problem please....?
thank you
-
May 12th, 2002, 10:22 AM
#2
Please post some of your code.
-
May 12th, 2002, 10:29 AM
#3
Thread Starter
New Member
CODE...
dim i as integer
for i = 1 to rslt.rows
msgrid.row = i 'picking up next row from the gird
msgrid.col = 3 'need advance number which is in column 3.
sAdvnumber = msgrid.text
'do some calculations based on the content of the row thats been selected. calls bunch of other complex functions here.
next i
Now I am suspecting, may be in the functions where I am calling the variable 'i' is being reset at the point 70th record is being called. Isn't it? And thats why the variable 'i' is going back to number 1 row instead of going to 71st row in the grid.
so I guess I should declare the variable 'i' as a global variable rather than form level variable.
-
May 12th, 2002, 10:42 AM
#4
so I guess I should declare the variable 'i' as a global variable rather than form level variable.
No, just the opposite. With "i" being local the way it is, other uses of that variable name will not affect the local use in the routine you posted. The only way that that could happen now would be if you were passing i ByRef (which is the default) to another routine. If you are not doing that then you probably have some chain of routines that is referring back to the routine you posted. To see if that is happening, set a breakpoint on the 1st line of code in that routine.
-
May 12th, 2002, 12:10 PM
#5
Thread Starter
New Member
thanks martin.
Let me try that tomorrow and see if that solves the problem
regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|