[CLOSED] checkbox callback wrong value
Hi there, I have developed a user control which allows to generate a CRUD form based on a JSON file.
For this purpose the user control creates grid and edit window with form for editing purposes.
I have located the initialisation code like this
Code:
Protected Overrides Sub OnInit(e As EventArgs)
MyBase.OnInit(e)
End Sub
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
InitControl()
OnAfterInit(e)
End Sub
Inside the InitControl routine I initialise fields like:
Code:
ElseIf _type = "checkbox" Then
Dim cb As New Ext.Net.Checkbox With {.FieldLabel = p("title").ToString, .Flex = "1"}
ctrl = cb
I first create form fields, then add them to form and finally add form to window and add window to user control.
My problem is that whenever I check the checkbox and click save button, in code behind when evaluating value for checkbox it tells the value is the one before modifying it at the screen. If I check true, I receive false, which happens to be the value before. If I then uncheck and hit save, I received true.
Do you have any idea of what could be wrong here?
I know it is difficult to understand specially considering I should submit a full example ir order for you to evaluate but wonder if this has happened before to someone and you already know how to fix it?