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.ExpressApp.Win.Editors

Public Class OfferInRowsVC
    Inherits DevExpress.ExpressApp.ViewController(Of ListView)
    Private _GridListEditor As GridListEditor

    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()
        RegisterActions(components)

    End Sub

    Protected Overrides Sub OnViewControlsCreated()
        MyBase.OnViewControlsCreated()

        'If View.Id = "OfferInHeader_OfferInRows_ListView" Then
        '    Dim _ListView As ListView = CType(View, ListView)
        '    Dim _PropertyCollectionSource As PropertyCollectionSource = CType(_ListView.CollectionSource, PropertyCollectionSource)
        '    Dim _OfferInHeader As OfferInHeader = CType(_PropertyCollectionSource.MasterObject, OfferInHeader)
        '    If _OfferInHeader.IsEditable = True Then
        '        _GridListEditor = TryCast(View.Editor, GridListEditor)
        '        If _GridListEditor IsNot Nothing Then
        '            _GridListEditor.AllowEdit = True
        '            For i As Integer = 0 To _GridListEditor.Columns.Count - 1
        '                If _OfferInHeader.CurrencyName.ShortName = "HUF" Then
        '                    If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" And _
        '                        _GridListEditor.GridView.Columns(i).FieldName <> "FinalPriceHUF" Then

        '                        _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
        '                        _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
        '                        _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
        '                    End If
        '                Else
        '                    If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" And _
        '                         _GridListEditor.GridView.Columns(i).FieldName <> "FinalPriceDEV" Then

        '                        _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
        '                        _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
        '                        _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
        '                    End If
        '                End If
        '            Next i
        '        End If
        '    End If
        'End If
    End Sub

End Class
