Bind GridViewDataColumn concurrently with two properties

2 posts, 0 answers
  1. papadi
    papadi avatar
    35 posts
    Member since:
    Nov 2008

    Posted 10 Sep 2012 Link to this post

    Hi!
    Please look at the following xaml:
    <telerik:GridViewDataColumn DataMemberBinding="{Binding}">
        <telerik:GridViewDataColumn.CellTemplate>
            <DataTemplate>
                <StackPanel Orientation="Vertical">
                    <TextBox Text="{Binding propertyA}" />
                    <TextBox Text="{Binding propertyB}" />
                </StackPanel>
            </DataTemplate>
        </telerik:GridViewDataColumn.CellTemplate>
    </telerik:GridViewDataColumn>

    My cell template has two text boxes that should be bound with two different properties of my data source item. How do I do that?
    Obviously my grid has other columns as well. The reason I want to do this and I don't want to use two different columns is that I want to save space and make my text boxes more wide. I don't mind about the vertical space being wasted that much.
  2. papadi
    papadi avatar
    35 posts
    Member since:
    Nov 2008

    Posted 10 Sep 2012 Link to this post

    dahhhh!
    Actually the xaml above works just fine! :)
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top