我正在加载.aspx中的用户control
以显示gridView
并在代码后面的列中动态创建CheckBox
模板字段。每当我check
或uncheck
时,autopostback
为triggered
。
由于我在page_load
中绑定()网格,它会在回发后跳过重新绑定gridView
(如果添加了Not IsPostback()条件)。
如何在PostBack后保留GridView
中的Checkbox
更改数据?用户control
与其他标签和文本框控件一起放在aspx中。
请建议如何在回发后重新获取此代码中的GridView
数据:
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Values(5) As String
Dim totalCount As Integer
Dim dtcustAcctSignRelation = New DataTable()
Dim lstCustInfo As ArrayList = TryCast(Session("CustInfo"), ArrayList)
Dim i As Integer = 0
If Not Page.IsPostBack Then
For Each value As String In lstCustInfo
Values(i) = value
i = i + 1
Next
Calendar1.Visible = False
lstRegInfo = CType(Session("secureURL"), Global.System.Collections.Generic.List(Of String))
HideLeftPanelFromMasterPage()
InitializeCustInfoPanel(Values)
dtcustAcctSignRelation = RetrieveBSUCustomer(Values, 1, totalCount, dtcustAcctSignRelation) '*** Getting DataTable values
LoadGridViewSignatoryGroup(Values(0).ToString(), dtcustAcctSignRelation) '*** Creating Template Fields and binding data to GridView
End If
End Sub