This is a migrated thread and some comments may be shown as answers.

Bind GridViewDataColumn concurrently with two properties

1 Answer 211 Views
GridView
This is a migrated thread and some comments may be shown as answers.
papadi
Top achievements
Rank 1
papadi asked on 10 Sep 2012, 02:46 PM
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.

1 Answer, 1 is accepted

Sort by
0
papadi
Top achievements
Rank 1
answered on 10 Sep 2012, 02:53 PM
dahhhh!
Actually the xaml above works just fine! :)
Tags
GridView
Asked by
papadi
Top achievements
Rank 1
Answers by
papadi
Top achievements
Rank 1
Share this question
or