BretG
Posts: 5
|
| Posted: 07/12/2005, 12:15 PM |
|
I have an editable grid with a checkbox in one of the columns. I am trying to update two hidden fields in the row with the username and date if that checkbox is checked. I want to do this at the server as I have other logic. I have tried BEFORESUBMIT, SubmitButton.OnClick, etc -- but I can not get the fields to update. The flag field updates fine.
My code snippet
Dim i, InsertedRows, Method, IsDeleted, HasErrors
Method = ccsPost
If VerificationGrid.SubmittedRows > 0 Then
For i = 1 To VerificationGrid.SubmittedRows - VerificationGrid.EmptyRows
IsDeleted = (Len(CCGetRequestParam("_" & CStr(i), Method)) > 0)
If Not IsDeleted Then
VerificationGrid.DataSource.flag.Value = IIf(IsEmpty(CCGetRequestParam("flag_" & CStr(i), Method)),VerificationGrid.flag.UncheckedValue,VerificationGrid.flag.CheckedValue)
If VerificationGrid.DataSource.flag.Value = 1 Then
VerificationGrid.VerifiedDate.Value = DATE()
VerificationGrid.VerifiedBy.Value = "USER"
VerificationGrid.DataSource.VerifiedDate.Value = DATE()
VerificationGrid.DataSource.VerifiedBy.Value = "USER"
VerificationGrid.DataSource.CurrentRow = i
VerificationGrid.DataSource.Update(VerificationGrid.Command)
End If
End If
Next
End If
Can anyone offer some suggestions and/or examples?
Thanks,
Bret
|