This repository has been archived by the owner on Dec 29, 2023. It is now read-only.
/
Default.aspx.vb
48 lines (40 loc) · 1.73 KB
/
Default.aspx.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Imports Microsoft.VisualBasic
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports DevExpress.Web.ASPxGridView
Imports DevExpress.Web.ASPxEditors
Namespace DetailPopup
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Protected Sub ASPxGridView2_BeforePerformDataSelect(ByVal sender As Object, ByVal e As EventArgs)
Session("CategoryID") = (CType(sender, ASPxGridView)).GetMasterRowKeyValue()
End Sub
Protected Sub ASPxGridView2_HtmlRowCreated(ByVal sender As Object, ByVal e As ASPxGridViewTableRowEventArgs)
If e.RowType = GridViewRowType.Data Then
Dim val As String = e.GetValue("ProductID").ToString()
Dim col As GridViewDataColumn = TryCast((CType(sender, ASPxGridView)).Columns("Template"), GridViewDataColumn)
Dim bt As ASPxButton = TryCast((CType(sender, ASPxGridView)).FindRowCellTemplateControl(e.VisibleIndex, col, "ASPxButton2"), ASPxButton)
bt.ClientInstanceName = "button" & e.VisibleIndex.ToString()
Session("ProductID") = val
bt.ClientSideEvents.Click = "function(s,e){panel.PerformCallback(" & val & "+';'+s.name); }"
End If
End Sub
Protected Sub ASPxCallbackPanel1_Callback(ByVal source As Object, ByVal e As DevExpress.Web.ASPxClasses.CallbackEventArgsBase)
Dim pars() As String = e.Parameter.Split(";"c)
Session("ProductID") = pars(0)
ASPxComboBox1.DataBind()
ASPxComboBox1.SelectedIndex = 0
ASPxPopupControl1.PopupElementID = pars(1)
End Sub
End Class
End Namespace