-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathClient-side.aspx.vb
More file actions
23 lines (22 loc) · 969 Bytes
/
Client-side.aspx.vb
File metadata and controls
23 lines (22 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Imports Microsoft.VisualBasic
Imports DevExpress.Web
Imports System.Collections.Generic
Imports System.Web.UI
Partial Public Class ClientSide
Inherits Page
Protected Sub Grid_FillContextMenuItems(ByVal sender As Object, ByVal e As ASPxGridViewContextMenuEventArgs)
If e.MenuType = GridViewContextMenuType.Rows Then
e.Items.Clear()
e.Items.Add(e.CreateItem("Custom item for all rows", "AllRows"))
e.Items.Add(e.CreateItem("Custom item for selected rows only", "OnlySelectedRows"))
e.Items.Add(e.CreateItem("Custom item for selected rows with 'Discontinued=true' only", "OnlySelectedAndDiscontinuedRows"))
End If
End Sub
Protected Sub Grid_CustomJSProperties(ByVal sender As Object, ByVal e As ASPxGridViewClientJSPropertiesEventArgs)
Dim list As New List(Of Boolean)()
For i As Integer = 0 To Grid.VisibleRowCount - 1
list.Add(CBool(Grid.GetRowValues(i, "Discontinued")))
Next i
e.Properties("cpDiscontinued") = list
End Sub
End Class