This question is locked. New answers and comments are not allowed.
Hi there,
I've looked everywhere but cannot find this border (with white background and yellow border) when you are editing a cells value - screen attached.
I would have assumed it would be in the GridViewCell template, under the edit state, but it isn't. I can't even find it with silverlight spy.
Any ideas?
Thanks!
felix
I've looked everywhere but cannot find this border (with white background and yellow border) when you are editing a cells value - screen attached.
I would have assumed it would be in the GridViewCell template, under the edit state, but it isn't. I can't even find it with silverlight spy.
Any ideas?
Thanks!
felix
4 Answers, 1 is accepted
0
Accepted
Hello Felix,
When a GridViewCell goes into edit mode the TextBox appeared and the eaisest way to change this behavior is to define an editor style for that column which represents a simple style targeted at TextBox.
You can use the following markup:
You can customize it to meet your personal requirements.
Best wishes,
Vanya Pavlova
the Telerik team
When a GridViewCell goes into edit mode the TextBox appeared and the eaisest way to change this behavior is to define an editor style for that column which represents a simple style targeted at TextBox.
You can use the following markup:
<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="SilverlightApplication201.MainPage" Width="640" Height="480"> <UserControl.Resources> <Style x:Key="a1" TargetType="TextBox"> <Setter Property="BorderBrush" Value="Black"/> <Setter Property="Background" Value="Red"/> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource SampleDataSource}}"> <telerik:RadGridView x:Name="grid" ItemsSource="{Binding Collection}" Margin="0,0,0,131"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn EditorStyle="{StaticResource a1}" Header="ID" DataMemberBinding="{Binding Property1}"/> <telerik:GridViewDataColumn Header="CompanyName" DataMemberBinding="{Binding Property2}"/> <telerik:GridViewDataColumn Header="Address" DataMemberBinding="{Binding Property3}"/> <telerik:GridViewHyperlinkColumn Header="Website" DataMemberBinding="{Binding Property4}"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid> </UserControl>You can customize it to meet your personal requirements.
Best wishes,
Vanya Pavlova
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
0
felix
Top achievements
Rank 1
answered on 18 Nov 2010, 03:09 PM
That works, thanks :)
Is there a way to set this style explicitly? Without having to set the EditorStyle on every column?
Thanks again!
felix
Is there a way to set this style explicitly? Without having to set the EditorStyle on every column?
Thanks again!
felix
0
Hi Felix,
Vanya Pavlova
the Telerik team
Just remove the x:Key within the style that is targeted at TextBox and you will not need to specify the EditorStyle property in any column.
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
felix
Top achievements
Rank 1
answered on 19 Nov 2010, 05:48 PM
Thanks, but that will change all textboxes, not just editorstyle checkboxes. Nevermind, thanks for the help anyway :)