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

radgridview binding problem

0 Answers 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sonam
Top achievements
Rank 1
sonam asked on 08 Apr 2011, 07:29 AM
hi telerik,
i am working with radgridview and come to face a strange problem with binding. as i know that the default binding mode is 'one way' and if we want to 'two way' mode we have to explicitly specify it .but in my code which i am posting here,the Daat Element column is working in two way manner without specifying it, while checkbox chkIsActive and textblock txtCategory are requiring to mention mode two way otherwise they are not working well . if i try to provide mode 'two way' to the listbox itemsource and not to its child controls then still it behave like one way. please explian me , such behaviour of controls.  
<telerik:RadGridView Grid.Row="1" Grid.Column="0" x:Name="DECategoryMapping" CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserSortColumns="True" AutoGenerateColumns="False" IsEnabled="True">
  
<telerik:RadGridView.Columns>
  
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=DENameList}" Header="Data Element"></telerik:GridViewDataColumn>
  
<telerik:GridViewDataColumn UniqueName="CategoryList" Header="Category List" DataMemberBinding="{ Binding Path=DElement.Category}">
  
<telerik:GridViewDataColumn.CellTemplate>
  
<DataTemplate>
  
<telerik:ListBox x:Name="lstCategory" ItemsSource="{Binding Path=Category}">
  
<telerik:ListBox.ItemTemplate>
  
<DataTemplate
  
<StackPanel Orientation="Horizontal">
  
<CheckBox x:Name="chkIsActive" IsChecked="{Binding Path=IsActive, Mode=TwoWay}"></CheckBox>
  
<TextBlock x:Name="txtCategory" Text="{Binding Path=CategoryName, Mode=TwoWay}"></TextBlock>
  
</StackPanel>
  
</DataTemplate>
  
</telerik:ListBox.ItemTemplate>
  
</telerik:ListBox>
  
</DataTemplate>
  
</telerik:GridViewDataColumn.CellTemplate>
  
</telerik:GridViewDataColumn>
  
</telerik:RadGridView.Columns>
  
</telerik:RadGridView>

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
sonam
Top achievements
Rank 1
Share this question
or