Home Forums WPF controls Xceed DataGrid for WPF How to point a property in the same class

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #24515 |


    I have created a UserControl
    <UserControl x:Class=”Operations.FirstOperation”
    xmlns:xcdg =”…wpf/xaml/datagrid”

    <xcdg:DataGridControl x:Name=”OperationGrid”
    ItemsSource=”{Binding Path=OperationList”}>

    Inside the FirstOperation Class

    Namespace Operations

    Partial Public Class FirstOperation
    Private data As OperationDataContext

    Public Sub OnInit()
    data = new DataContext
    data.OperationList = GetoperationList()
    Me.DataContext = data
    end sub

    End class
    End NameSpace

    Public Class DataContext
    Private operationListField As List(Of Operation)
    public Property OperationList

    End Get

    End Set
    End Property
    end class

    Public class Operation
    private OrderField As integer
    public Property Order
    set …
    end property

    end class

    That’s working. But I wont to sort my operations by the Order property
    What should I write instead of ??????

    <xcdg:DataGridCollectionViewSource x:Key=”operList” Source={Binding Source={???????}, Path=OperationList}”>


    Imported from legacy forums. Posted by Sergey (had 385 views)

    Xceed Support
    Post count: 5658

    Since you are using a UserControl, my suggestion for the moment would be to create a DataGridCollectionView in the code behind to wrap your operation list and assign it a SortDescription directly… You can then assign the DataGridCollectionView to the UserControl’s DataContext.

    It seems there is currently a limitation with the DataGridCollectionViewSource where the Source can only be bound using a static source.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 2654 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.