or
ControlTemplate
<ControlTemplate x:Key="GridViewToggleButtonTemplate" TargetType="telerik:GridViewToggleButton"> <Border Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> <Border Width="80" Height="20" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"> <Grid x:Name="myGrid"> <TextBlock Text="Details" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid> </Border> </Border> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="myGrid" Property="Background" Value="Red" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> <Style TargetType="telerik:GridViewToggleButton" x:Key="toggleButtonStyle"> <Setter Property="Template" Value="{StaticResource GridViewToggleButtonTemplate}" /> </Style>
And applied this style in telerik:RadGridView.Columns as below
<telerik:GridViewToggleRowDetailsColumn ToggleButtonStyle="{StaticResource toggleButtonStyle}" />
But this doesn't work so please let know how do i fix this problem.
Thanks in advance.
mChartControl.AxisElementBrush = new SolidColorBrush(value);
<telerik:RadComboBox Grid.Row="0" Grid.Column="1" Margin="3" telerik:StyleManager.Theme="Summer" Name="SpracheCCB" DisplayMemberPath="Name" SelectionChanged="SpracheCCB_SelectionChanged" />this.SpracheCCB.SelectedItem = SETTINGS.aktsprache; orthis.SpracheCCB.SelectedItem = 1;I would like to bring a row of my RadGridView into view programatically. I have a more than 100 rows. When I create a row(which I am doing by adding an item to a observable collection) I would like that new row to be selected and bring that into view. I was able to select the new row in my code but could not do the scrolling. More over I want the first cell of the row to be in edit mode so that the user can input text. I am following MVVM pattern for the application and would like to keep zero code in my views. How Can I achieve this?
Any help or suggestion will be appreciated....
Here is some of my code
XAML
<telerik:RadGridView ItemsSource="{Binding AllPartClasses}"
SelectedItem="{Binding SelectedPartClassViewModel, Mode=TwoWay}"
SelectionMode="Single" IsSynchronizedWithCurrentItem="True">
in my view model I did this
void AddNewPartClassExecute()
{
PartClass newPartClass = new PartClass();
PartClassViewModel tempPartClass = new PartClassViewModel(newPartClass);
tempPartClass.IsInValid = true;
AllPartClasses.Add(tempPartClass);
SelectedPartClassViewModel = tempPartClass;
Global.DbContext.PartClasses.AddObject(newPartClass);
//OnPropertyChanged("AllPartClasses");
}
public PartClassViewModel SelectedPartClassViewModel
{
get
{
return _selectedPartClassViewModel;
}
set
{
_selectedPartClassViewModel = value;
OnPropertyChanged("SelectedPartClassViewModel");
}
}