Hi, I have a docking pane hosting a Winform property control.
When I set the pane to a Autohide state, the Winform property in it disappears.
I'm using the latest 2016 Q2 release. Please help!
Hi,
I want to apply a different CurrentVisibleRangeText dependant on what view definition the user is in.
So DayView would be in the format ddd dd\MM\yyyy
Timeline and MonthView would be dd\MM\yyyy - dd\MM\yyyy
So I've changed the CurrentInterval ContentControl to use VisibleRange instead of CurrentVisibleText :
<ContentControl x:Name="CurrentInterval" VerticalAlignment="Center" HorizontalAlignment="Right" Style="{StaticResource NavigationIntervalStyle}" Content="{TemplateBinding VisibleRange}"/>Now how do I apply the NavigationIntervalStyle? So far I have :
<Style x:Key="NavigationIntervalStyle" TargetType="ContentControl"> <Setter Property="Margin" Value="5" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="FontWeight" Value="Bold" /> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <Grid> <TextBlock Margin="0 1 0 0" Text="{Binding Path=Start, StringFormat={}{0:ddd dd/MM/yyyy}}" Foreground="White" /> </Grid> </DataTemplate> </Setter.Value> </Setter></Style>This works ok for DayView but obviously not giving me what I want for Timeline or MonthView - I would presume I would need another TextBlock linked to VisibleRange.End - but how to set the Visibility of this textbox so I don't get it in DayView? Also would it be at all feasible for MonthView to run off the actual Month date and not just what is visible.. i.e. so it says 01/07/2016 - 31/07/2016 and not 27/07/2016 - 31/07/2016 (which is the actual VisibleRange of the month).
I am changing ItemsSource of RadGridview.
gv.ItemsSource = enumerated;
gv.Rebind();
After that I am clearing all the Descriptors
gv.FilterDescriptors.Clear();
gv.SortDescriptors.Clear();
gv.GroupDescriptors.Clear();
Then reapplying all Descriptors.
gv.FilterDescriptors.AddRange(filters);
gv.SortDescriptors.AddRange(sorts);
gv.GroupDescriptors.AddRange(groups);
Hi,
I want the ability for the user to be able to click on a Group Header (in DayView) and for the Group Header and Row to be Selected - however a few issues I cant seem to solve :
I'm overriding the GroupHeaderBaseStyle but can't seem to bind the Command on the GroupHeaderButton to my ViewModel - how do I go about achieving this so I can catch when the user has clicked on each GroupHeader?
There doesn't seem to be an IsSelected property for the GroupHeader - so how would I go about storing this information as per the user clicking on each header?
Thanks.
Hi,
I need to implement DragDrop feature between listBoxes and also re-order within ListBox. I know there is one good sample from Demo, see attachment screenshot. But What I am missing here is the Drop preview line. I know in RadTreeView, there is the default DragDrop behavior comes with a good Drop preview line and API for me to enable/disable it. How can I do the same for ListBox?
I thought about using RadTreeView to take advantage of the default DragDrop behavior, but don't know how to make the UI layout to look like this one in ListBox. Please advise if there is any alternatives to get the layout like the one in the demo, and the drop preview line in RadTreeView.
Many thanks,
Mingxue
When I import the word file attached, it has a stackOverFlow exception when I running following code
foreach (var section in document.Sections)
{
document.CaretPosition.MoveToEndOfDocumentElement(section);
editor.ChangeSectionColumns(SectionColumnsLayout.One);
}
Is there any way to solve it, or how can I modify the word file to avoid the crash?
Hi,
I want to to move dataform's button (add, edit, delete, navigation, cancel and commit) outside of the DataForm maintaining their appearance , so when I change application's theme from windows8 to windows8touch , the appearance of the buttons change like if it was in the dataform.
thanks
Hello,
I'm having trouble to automatically expand all groups within a RadGridView. I set the AutoExpandGroups to true and also call the RadGridView's method ExpandAllGroups(). It does expand all the groups, but it also adds an unwanted white space to my grid, that vanishes after I manually collapse one of the groups.
I also tried to set the GroupRenderMode to Flat. It solves the white space issue, but it adds unwanted information to my groups' headers.
Is there a way to make it work properly?
*Telerik UI for WPF version 2015.3.930.45
Thanks in advance.
I'm trying to create a column with a delete button that the user will use to delete rows. I want to force the user to use this button when they want to delete a row.
These were my requirements
Things I've done so far
So far this works but I found two issues (possibly the same issue but may require different solutions)
I figured they may be the same issue because they both have to do with being in edit mode for a row.
Issue when creating a new row
I run my project, click the bottom of the grid to create a new row, then try clicking the delete button on that row. Nothing happens.
It probably doesn't make much sense to delete a row while it's being added so that may be why this doesn't work. If possible I would like the delete button to cancel adding the new row, so kind of like a delete. If this isn't possible, I would like to be able to hide the button when a new row is created so it's obvious to the user they can't click it.
Issue when editing a row
I run my project, double click in one of the cells to start editing the cell, the try clicking the delete button. Again, nothing happens. The cell being edited seems to lose focus and no longer shows the edit box but I can't click the delete button. To get the delete to work I have to single click into a different cell and then click the delete button.
I appreciate any help you can provided.
This is the XAML for MainWindow
<Window x:Class="TelerikWpfGridViewDeleteButton.MainWindow" xmlns:local="clr-namespace:TelerikWpfGridViewDeleteButton" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525" DataContext="{StaticResource MyViewModel}"> <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Resources.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources> <Grid> <telerik:RadGridView Name="RadGridViewVariableCutOff" ItemsSource="{Binding GridRows}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" GroupRenderMode="Flat" NewRowPosition="Bottom" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="Cell" PreviewKeyDown="RadGridViewVariableCutOff_PreviewKeyDown"> <telerik:StyleManager.Theme> <telerik:Office_SilverTheme/> </telerik:StyleManager.Theme> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="First Value" Width="1*" DataMemberBinding="{Binding Path=FirstValue}"/> <telerik:GridViewDataColumn Header="Second Value" Width="1*" DataMemberBinding="{Binding Path=SecondValue}"/> <telerik:GridViewDataColumn Header="" Width="26" TabStopMode="Skip" IsReadOnly="True" CellStyle="{StaticResource TelerikNoCellPadding}"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <telerik:RadButton Template="{StaticResource FlatImageButton}" Margin="0" Command="telerikGrid:RadGridViewCommands.Delete" CommandParameter="{Binding}"> <Image Source="Delete_WithPadding.png"/> </telerik:RadButton> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> <telerik:GridViewDataColumn.CellEditTemplate> <DataTemplate> </DataTemplate> </telerik:GridViewDataColumn.CellEditTemplate> </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid></Window>
This is the code behind for MainWindow
using System.Windows;using System.Windows.Input;namespace TelerikWpfGridViewDeleteButton{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void RadGridViewVariableCutOff_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Delete) e.Handled = true; } }}
This is my view model
using System.Collections.ObjectModel;using System.ComponentModel;using System.Runtime.CompilerServices;namespace TelerikWpfGridViewDeleteButton{ public class MyViewModel : INotifyPropertyChanged { private ObservableCollection<RowData> gridRows; public ObservableCollection<RowData> GridRows { get { if (gridRows == null) { gridRows = new ObservableCollection<RowData>(); gridRows.Add(new RowData() { FirstValue = 1, SecondValue = 2 }); gridRows.Add(new RowData() { FirstValue = 3, SecondValue = 4 }); gridRows.Add(new RowData() { FirstValue = 4, SecondValue = 6 }); } return gridRows; } set { gridRows = value; NotifyPropertyChanged(); } } public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged([CallerMemberName] string propertyName = "") { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } }}
This is the class used in the observable collection
namespace TelerikWpfGridViewDeleteButton{ public class RowData { public decimal FirstValue { get; set; } public decimal SecondValue { get; set; } public RowData() { } }}
This is my resource dictionary
<ResourceDictionary xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:TelerikWpfGridViewDeleteButton"> <ControlTemplate x:Key="FlatImageButton" TargetType="{x:Type Button}"> <Border x:Name="bdr_main" SnapsToDevicePixels="True" BorderThickness="1" CornerRadius="0" Background="White"> <ContentPresenter RecognizesAccessKey="True"></ContentPresenter> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="bdr_main" Property="BorderBrush" Value="Black"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> <Style x:Key="TelerikNoCellPadding" TargetType="{x:Type telerik:GridViewCell}"> <Setter Property="Margin" Value="0"/> <Setter Property="Padding" Value="0"/> </Style></ResourceDictionary>
And this is my App.xaml
<Application x:Class="TelerikWpfGridViewDeleteButton.App" xmlns:local="clr-namespace:TelerikWpfGridViewDeleteButton" StartupUri="MainWindow.xaml"> <Application.Resources> <local:MyViewModel x:Key="MyViewModel" /> </Application.Resources></Application>
And I've attached the delete button image I used