This question is locked. New answers and comments are not allowed.
Hi!
I have a Silverlight 5 project that uses RadGridView.
This RadGridView has RowDetails, which contains editable TextBox. When the value in this TextBox reaches its MaxLength (after pasting), first column in selected grid row is automatically edited. How can I avoid such behaviour?
Test code below:
XAML:
Models:
Code behind:
I have a Silverlight 5 project that uses RadGridView.
This RadGridView has RowDetails, which contains editable TextBox. When the value in this TextBox reaches its MaxLength (after pasting), first column in selected grid row is automatically edited. How can I avoid such behaviour?
Test code below:
XAML:
<telerik:RadGridView Name="gvMain" AutoGenerateColumns="False"> <telerik:RadGridView.ChildTableDefinitions> <telerik:GridViewTableDefinition /> </telerik:RadGridView.ChildTableDefinitions> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Title}" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding PageCount}" /> </telerik:RadGridView.Columns> <telerik:RadGridView.HierarchyChildTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <TextBlock>Name</TextBlock> <TextBox Text="{Binding DataContext.Author.Name, RelativeSource={RelativeSource FindAncestor, AncestorType=StackPanel}}" MaxLength="20" Width="100" /> </StackPanel> </DataTemplate> </telerik:RadGridView.HierarchyChildTemplate> </telerik:RadGridView>Models:
public class Author{ public string Name { get; set; } public string LastName { get; set; }}public class Book{ public string Title { get; set; } public int PageCount { get; set; } public Author Author { get; set; }}Code behind:
this.gvMain.ItemsSource = new List<Models.Book>(){ new Book(){ Author = new Author(){ Name = "John", LastName = "Smith"}, Title = "Dummy", PageCount = 100}};