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

GroupViewModel in ViewModel

1 Answer 52 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Levon
Top achievements
Rank 1
Levon asked on 29 May 2013, 01:34 PM
Hi,
I have my own defined GroupHeaderTemplate in the RadGridView. The picture is attached and a part of the code goes here:
<TextBox Grid.Column="0"
 Text="{Binding Group.Items[0].Name, Mode=TwoWay}"
 Foreground="#50A0DA"
 FontWeight="Bold"
 VerticalAlignment="Center"
 HorizontalAlignment="Left"
 Width="Auto""/>
When I rename the text in the textbox, I want to save it to my DB. But the renamed Name is not the one that is selected in the GridView, so i can't get it from the SelectedItem of my GridView.

How can i bind the changed name to a property from my ViewModel? 

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 31 May 2013, 10:57 AM
Hi,

You can not bind to two properties simultaneously . The way to solve the issue would be to handle the TextChanged event of the TextBox and perform DB save actions within the handler.


Regards,
Pavel Pavlov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Levon
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or