Answered by:
validation of grid cell not displaying result

Question
-
Hello
when user inputs in one column of grid i am updating another column of grid in beforerowcolchange. but changes are not displaying. even i brow the cursor to see the result but in cursor that fiield is not updated. code is "replace cursor.qty with cursor.opnqty" when i move back to that row and forward result is displaying.
Tariq Iftikhar
Saturday, June 25, 2011 6:05 AM
Answers
-
Hi Tariq
sorry I din't answer earlier so you've find the solution yourself probably.
The problem in your case is the Grid cell value which is stored into the table after you leave the cell. So the newly entered column value is available for REPLACE command a little bit later and the replacement appears when you move to another row or another cell.
You may use direct cell value in the REPLACE command:
replace cursor.qty with THIS.Column1.Text1.Value && The ColumnX must correspond to the cursor.opnqty field
- Proposed as answer by Tom BorgmannEditor Friday, April 20, 2012 7:49 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Thursday, May 24, 2012 7:16 PM
Sunday, February 26, 2012 8:27 AM
All replies
-
This is hard to answer without more info. The first view could point to a Private data session and buffering in the form. If you are looking at the cursor in different data session then the change will appear after buffers are saved by TABLEUPDATE when the row changes.Saturday, June 25, 2011 8:29 AM
-
thanks Pavel Celba
i have created a cursor named tmp with create cursor command. recordsource of grid is tmp. recordsourcetype is 1. form data session is 2. no buffering on cursor tmp. i have to update tmp.qty when user changes tmp.opnqty. in beforerowcolchange i have placed code 'replace tmp.qty with tmp.opnqty' changing tmp.opnqty does not reflect change tmp.qty.
Tariq Iftikhar
Saturday, June 25, 2011 6:11 PM -
Hi Tariq
sorry I din't answer earlier so you've find the solution yourself probably.
The problem in your case is the Grid cell value which is stored into the table after you leave the cell. So the newly entered column value is available for REPLACE command a little bit later and the replacement appears when you move to another row or another cell.
You may use direct cell value in the REPLACE command:
replace cursor.qty with THIS.Column1.Text1.Value && The ColumnX must correspond to the cursor.opnqty field
- Proposed as answer by Tom BorgmannEditor Friday, April 20, 2012 7:49 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Thursday, May 24, 2012 7:16 PM
Sunday, February 26, 2012 8:27 AM