This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.vb
56 lines (47 loc) · 1.83 KB
/
Form1.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
49
50
51
52
53
54
55
56
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Data
Imports System.Linq
Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors.Controls
Namespace CustomEditor
Partial Public Class Form1
Inherits XtraForm
Public Sub New()
InitializeComponent()
CreateDataSource()
ConfigureRepositoryItemButtonEdit()
End Sub
Private Sub CreateDataSource()
Dim dataTable As New DataTable()
dataTable.Columns.Add("Name", GetType(String))
dataTable.Columns.Add("File with information", GetType(String))
dataTable.Rows.Add(New Object() { "John Smith", "" })
dataTable.Rows.Add(New Object() { "Ivanov", "" })
dataTable.Rows.Add(New Object() { "Petrov","" })
dataTable.Rows.Add(New Object() { "John Smith", "" })
dataTable.Rows.Add(New Object() { "Ivanov", ""})
dataTable.Rows.Add(New Object() { "Petrov", "" })
dataTable.Rows.Add(New Object() { "John Smith", "" })
dataTable.Rows.Add(New Object() { "Ivanov", "" })
dataTable.Rows.Add(New Object() { "Petrov","" })
dataTable.Rows.Add(New Object() { "John Smith", ""})
gridControl1.DataSource = dataTable
End Sub
Private Sub ConfigureRepositoryItemButtonEdit()
Dim item As RepositoryItemFileEdit = SpecifyRepositoryItemFileEdit()
gridControl1.RepositoryItems.Add(item)
gridView1.Columns("File with information").ColumnEdit = item
gridView1.ShowButtonMode = DevExpress.XtraGrid.Views.Base.ShowButtonModeEnum.ShowAlways
End Sub
Private Function SpecifyRepositoryItemFileEdit() As RepositoryItemFileEdit
Dim item As New RepositoryItemFileEdit()
item.Buttons(0).Kind = ButtonPredefines.DropDown
item.Buttons.Add(New EditorButton(ButtonPredefines.Glyph))
item.Buttons(1).Image = My.Resources.open
item.Buttons(1).Tag = "OpenFileDialog"
Return item
End Function
End Class
End Namespace