[英]Can't access ExtJS radio button on form
So I have an .aspx page. 所以我有一个.aspx页面。 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.
但是,第一个控件是ExtObject,而不是我们预设的VB.NET控件之一。 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.
每次都默认将其设置为“ And”。 Below is a snippet of code from the actual asp.net grid.
下面是实际的asp.net网格中的代码片段。 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 去添加这行到javascript保存功能
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? Ext ref:表示与我的控件以及访问控件的方式不同吗?
Added a ref to the item of checkWin. 向checkWin项目添加了一个引用。
Then the ref to the radio value became 然后对无线电值的引用变为
checkWin.Payee2.AndOr.getValue()
With that it can recognize the control on the form. 这样,它可以识别表单上的控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.