Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
540
Custom logic while using RowEditTemplate
posted

I let the wizard create a rowedittemplate on a grid I'm working with.  The gridrow contains 6 accounting segments and a checkbox.  When the user changes any one or more of the 6 CellProxy fields, I wish to validate the combination is a valid account.  I've added another button to the rowedittemplate form called "Validate".  I've added logic to disable the "OK" button after the user changes any of the 6 fields.  I want the user to click "Validate" after they have made their changes.  I'm able to pass the 6 different CellProxy fields values to a method that will return a "True" or "False" value.

Where my problem lies is changing the checkbox "ugcpValidAcct", the boolean field from my grid that the wizard created a checkbox with. 

Below is a snippit of the code I'm currently working with. 

valGLAcct = _Validate.LongAcctVerify(GLAcct)

If valGLAcct.ValidAcct = True Then

btnTemplateOk.Enabled = True

ugcpValidAcct.Text = "True"

Else

btnTemplateOk.Enabled = False

ugcpValidAcct.Text = "False"

End If

Parents
No Data
Reply
  • 37774
    Verified Answer
    posted

    I assume that your problem is that setting ugcpValidAcct.Text isn't doing anything.  This is deliberate, since the control simply hosts the editor that the underlying cell is using, and so doesn't support setting the Text property.  What you would need to do in this case is set the value of the underlying cell; since you're in the middle of an edit operation (and assuming that the underlying row's object implements IEditableObject), this behaves just as if it had been done through the grid, and cancelling the template would revert what you set yourself.

    -Matt

Children
No Data