The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
edit a datagrid
Posted: 28 Jul 09 2:38 PM
|
v6.2.4
I know this may have been touched on before but i still don't understand..
if you have a grid with three columns, A, B, C and you have 6 rows in total...the data in column a or b effects whats in column C
now if you update row 2 column B and that value gets replicated down thru row 6 and now I need to update the data in column C from row 2 thru 6...i understand how to update the value in C... my problem is that i am struggling with how to grab the value in column A in row 3 and row 4 and down thru 6 ... how do you get at that single value in each row...what is the code to do that???? i assume its gridname.something
thanks in advance
|
|
|
|
Re: edit a datagrid
Posted: 28 Jul 09 3:19 PM
|
datagrid.GetCurrentField("FIELDNAME") will get you the value for the Keyfield. If you leave the Field Name empty, it will return you the value of the KeyField (if one is specified on the Data Grid)
|
|
|
|
Re: edit a datagrid
Posted: 28 Jul 09 3:22 PM
|
that gets me the value of the current row that i started with but if i want to move to the next row programatically how do you do that? i can get the values of the current row that's initially effected..its the subsequent rows after that i need to get a value from...now sure how to loop thru those and grab the value,, |
|
|
|
Re: edit a datagrid
Posted: 28 Jul 09 3:38 PM
|
Use the Grid's recordset:
Dim rec
Set rec = datagrid.Recordset
rec.MoveFirst 'Go to First Row
Do While not rec.EOF rec.Fields("FIELDNAME").value ... rec.MoveNext Loop
|
|
|
| |
|