views:

91

answers:

1

So I have an .aspx page. In this grid I'm adding a bunch of controls. The first control however is an ExtObject, not one of our preset VB.NET controls. When I go to access the value on the backend for this field with this code:

form.AndOr.getValue()

It doesn't work. I really have no idea what is wrong. Basically, the radio button value isn't saving when I save the rest of the stuff. So I tried to add code to do it. It was just defaulted to 'And' each time. Below is a snippet of code from the actual asp.net grid. Any ideas?

With .Item(2)
                    .Ref = "../Payee2"
                    .LabelWidth = 90
                    With .AddFieldSet("Payee 2")
                        .AddControl(New Forms.Control("", "../PayeeId")).Hidden = True
                        .AddControl(New Forms.Control("", "../AddressId")).Hidden = True

                        .AddExtObject("{xtype:'radiogroup', ref:'../AndOr', defaults:{name:'rdo-payee2'}, width:120, items:[{boxLabel:'And', checked:true, inputValue:'and'},{boxLabel:'Or', inputValue:'or'}]}")
                        Dim ddlPayee2 As New Controls.ComboBox("", "../PayeePreInfo2", "Payee")
                        With ddlPayee2
                            .ForceSelection = True
                            .TypeAhead = False
                            .EmptyText = "Select Payee Details"
                            .ValueField = "AddressId"
                            .XTemplate = "applicantTemplate"
                            .ClientStore = "applicantAddressStore"
                            .AddListener(Akcelerant.Framework.WebControls.Controls.EventType.Select, "function(){prefillPayee('PAYEE2');}")
                        End With
                        .AddControl(ddlPayee2)
                        With .AddControl(New Forms.Control("", "../FirstName", "First Name", ""))
                            .Validate.MaxLength = 50
                            .ReadOnly = EditControl.IsFieldReadOnly(10483, True)
                        End With
                        With .AddControl(New Forms.Control("", "../LastName", "Last Name", ""))
                            .Validate.MaxLength = 50
                            .ReadOnly = EditControl.IsFieldReadOnly(10484, True)
                        End With

The error it throws is this:

Stack overflow at line: 16736

edit:

reverted some changes back and everything saves EXCEPT that value into the DB.

go to add this line to the javascript save function

if (form.AndOr.getValue() == 'and') {
                payeeRec.set('IsPayee2RequiredToSign', 1);
            } else {
                payeeRec.set('IsPayee2RequiredToSign', 0);
            }

and i get this error:

form.AndOr is not defined

Does the Ext ref: mean something different than my controls and how I access them?

+1  A: 

Added a ref to the item of checkWin.

Then the ref to the radio value became

checkWin.Payee2.AndOr.getValue()

With that it can recognize the control on the form.

Scott