簡體   English   中英

無法訪問表單上的ExtJS單選按鈕

[英]Can't access ExtJS radio button on form

所以我有一個.aspx頁面。 在此網格中,我添加了一堆控件。 但是,第一個控件是ExtObject,而不是我們預設的VB.NET控件之一。 當我使用以下代碼訪問該字段的后端值時:

form.AndOr.getValue()

沒用 我真的不知道怎么了。 基本上,當我保存其余內容時,單選按鈕值不會保存。 所以我試圖添加代碼來做到這一點。 每次都默認將其設置為“ And”。 下面是實際的asp.net網格中的代碼片段。 有任何想法嗎?

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

它引發的錯誤是這樣的:

Stack overflow at line: 16736

編輯:

還原了一些更改,所有內容都將該值保存到了數據庫中。

去添加這行到javascript保存功能

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

我得到這個錯誤:

form.AndOr is not defined

Ext ref:表示與我的控件以及訪問控件的方式不同嗎?

向checkWin項目添加了一個引用。

然后對無線電值的引用變為

checkWin.Payee2.AndOr.getValue()

這樣,它可以識別表單上的控件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM