First create solution
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Public Class DisableGridColumnsVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
Dim _GridListEditor As GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
Dim _GridColumn As GridColumn
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
For Each _GridColumn In _GridListEditor.GridView.Columns
|
||||
If _GridColumn.FieldName Like "row_*" Or _GridColumn.FieldName Like "!row_*" Then
|
||||
_GridColumn.Visible = False
|
||||
_GridColumn.OptionsColumn.AllowShowHide = False
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'GridListEditor gridListEditor = View.Editor as GridListEditor;
|
||||
' if (gridListEditor != null)
|
||||
' foreach (GridColumn column in gridListEditor.GridView.Columns)
|
||||
' if (column.FieldName == "Photo")
|
||||
' column.OptionsColumn.AllowShowHide = false;
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user