or
ResizeMode="CanResizeWithGrip"on the window.
Dear all,
I am in a very bad situation ,
coz , I have started a wpf project ...all is well except in the case of radgrid view in wpf ...
I am expecting all the functionality of windows radgridview in wpf. like adding rows etc.
is there any way to add the windows rad control to wpf ?.
If anybody know a solution please share it with me............
Thanks and Regards,
Firoz
Qatar
private ObservableCollection<IRoleUtilisateur> _userRole; |
public ObservableCollection<IRoleUtilisateur> ListUserRole |
{ |
get { return _userRole; } |
set |
{ |
_userRole = value; |
OnPropertyChanged("ListUserRole"); |
} |
} |
private int _rang; |
public int Rang |
{ |
get |
{ |
return _rang; |
} |
set |
{ |
_rang = value; |
} |
} |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn Header="{Loc rank}" DataMemberBinding="{Binding Rang}" /> |
</telerik:RadGridView.Columns> |
<Grid> |
<telerikNavigation:RadTileView x:Name="settingRadTileView" |
MinimizedItemsPosition="Left" |
ItemsSource="{Binding Source={StaticResource ModulItems}, XPath=Modul}" |
MaximizeMode="One" |
ItemContainerStyle="{StaticResource RadTileViewItemStyle}" |
Background="{x:Null}" |
SizeChanged="RadTileView_SizeChanged" |
> |
<telerikNavigation:RadTileView.ItemTemplate> |
<DataTemplate> |
<DockPanel Width="Auto" Height="Auto" LastChildFill="False"> |
<TextBlock Text="{Binding XPath=Name}" |
HorizontalAlignment="Center" |
Style="{DynamicResource TextBlockStyle}" |
VerticalAlignment="Center" Height="Auto"/> |
</DockPanel> |
</DataTemplate> |
</telerikNavigation:RadTileView.ItemTemplate> |
<telerikNavigation:RadTileView.ContentTemplate> |
<DataTemplate> |
<telerik:RadFluidContentControl SmallToNormalThreshold="128 128" NormalToSmallThreshold="128 128" |
NormalToLargeThreshold="600 600" LargeToNormalThreshold="600 600" State="Normal"> |
<telerik:RadFluidContentControl.SmallContent> |
<Grid Width="64" Height="64"> |
</Grid> |
</telerik:RadFluidContentControl.SmallContent> |
<telerik:RadFluidContentControl.Content> |
<Grid Width="128" Height="128"> |
</Grid> |
</telerik:RadFluidContentControl.Content> |
<telerik:RadFluidContentControl.LargeContent> |
<Border Width="Auto" Height="Auto" BorderThickness="3" BorderBrush="Blue"> |
<StackPanel> |
<TextBlock Text="Large" Foreground="White"/> |
</StackPanel> |
</Border> |
</telerik:RadFluidContentControl.LargeContent> |
</telerik:RadFluidContentControl> |
</DataTemplate> |
</telerikNavigation:RadTileView.ContentTemplate> |
</telerikNavigation:RadTileView> |
</Grid> |
private void RadTileView_SizeChanged(object sender, System.Windows.RoutedEventArgs e) |
{ |
Grid parent = this.settingRadTileView.Parent as Grid; |
int itemsCount = settingRadTileView.Items.Count - 1; // beacause one is alwasy maximized |
foreach (var item in settingRadTileView.Items) |
{ |
if (item != null) |
{ |
// set the height of each item in order to show all items minimzed at the left. |
RadTileViewItem radTileItem = settingRadTileView.ItemContainerGenerator.ContainerFromItem(item) as RadTileViewItem; |
radTileItem.MinimizedHeight = settingRadTileView.ActualHeight / itemsCount; |
radTileItem.MinimizedWidth = settingRadTileView.ActualHeight / itemsCount; |
} |
} |
} |
private void RadGridView_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Tab)
{
var grid = sender as RadGridView;
var currentItem = grid.CurrentItem as OrderDetail;
if ((currentItem != null) && (currentItem.IsValid))
{
grid.BeginInsert();
grid.CurrentColumn = grid.Columns[0];
}
else
{
e.Handled = true;
}
}
}
private void RadGridView_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
{
e.NewObject = OrderDetail.NewOrderDetail();
}