I'm just starting out with WPF and with the Telerik controls and am trying to work with RadWindow; I'm following the example in "User RadWinfow as UserControl" and the window is running but it is not displaying on the screen. I've followed the example to the letter so stuck as to what the issue is?
The RadWindow XAML is as per the example:
<telerik:RadWindow x:Class="Temp.TelerikScenario1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Header="TelerikScenario1" Height="300" Width="300">
<Grid>
</Grid>
</telerik:RadWindow>
and so is the code:
public partial class TelerikScenario1
{
public TelerikScenario1()
{
InitializeComponent();
}
}
Then I try to open in the MainWindow.xaml.cs:
public MainWindow()
{
InitializeComponent();
TelerikScenario1 window = new TelerikScenario1();
window.Show();
}
And whilst I can see the code is running for the TelerikScenario1 RadWindow it is not displayed on the screen? (if I declare a new Radwindow in c# "RadWindow radWindow = new RadWindow();" then that opens fine).
The Top grid will show the row as invalid. and the botton grid will have a new row
Here is the Xaml
<
Window
x:Class
=
"TestMultipleRadGrids.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadGridView
Grid.Row
=
"0"
x:Name
=
"_rad1"
ValidatesOnDataErrors
=
"InEditMode"
ShowGroupPanel
=
"False"
AutoGenerateColumns
=
"False"
CanUserReorderColumns
=
"True"
CanUserInsertRows
=
"True"
RowValidating
=
"_rad1_RowValidating"
ShowInsertRow
=
"True"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Name1"
/>
<
telerik:GridViewDataColumn
Header
=
"Initial Value1"
DataMemberBinding
=
"{Binding InitialValue1, Mode=TwoWay}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
<
telerik:RadGridView
Grid.Row
=
"1"
x:Name
=
"_rad2"
ShowGroupPanel
=
"False"
ValidatesOnDataErrors
=
"InEditMode"
AutoGenerateColumns
=
"False"
CanUserReorderColumns
=
"True"
CanUserInsertRows
=
"true"
RowValidating
=
"_rad2_RowValidating"
ShowInsertRow
=
"True"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Name2"
/>
<
telerik:GridViewDataColumn
Header
=
"Initial Value2"
DataMemberBinding
=
"{Binding InitialValue2, Mode=TwoWay}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Grid
>
</
Window
>
Here is the code behind:
using System.Windows;
using Telerik.Windows.Controls;
namespace TestMultipleRadGrids
{
/// <
summary
>
/// Interaction logic for MainWindow.xaml
/// </
summary
>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void _rad1_RowValidating(object sender, Telerik.Windows.Controls.GridViewRowValidatingEventArgs e)
{
GridViewCellValidationResult validationResult = new GridViewCellValidationResult();
validationResult.PropertyName = "InitialValue1";
validationResult.ErrorMessage = "Error";
e.ValidationResults.Add(validationResult);
e.IsValid = false;
}
private void _rad2_RowValidating(object sender, Telerik.Windows.Controls.GridViewRowValidatingEventArgs e)
{
_rad1.Focus();
GridViewCellValidationResult validationResult = new GridViewCellValidationResult();
validationResult.PropertyName = "InitialValue2";
validationResult.ErrorMessage = "Error";
e.ValidationResults.Add(validationResult);
e.IsValid = false;
}
}
}
Any help would be greatly appreciated.
I tried hosting your WPF RichTextBox in a WinForms application and the Japanese IME doesn't work properly with it. I used the Microsoft IME and the characters start repeating themselves.
I am wanting to change the behavior of the Radial Menu Button. Instead of opening / closing the radial menu, I'd like it to do something else.
Is it possible to override the behavior of the central radial menu button on a radial menu?
when I batch delete links, the number is 2000, I use removelink method to remove the link from UI, but the efficiency is very low, the time is 67 seconds, if do not call the method the time is 2 seconds
why the removelink method is so low efficiency, and is any solution the raise batch delete links efficiency?
thank you !
Is it possible to save a RadRichTextBox RadDocument with IsTrackChangesEnabled so that it can be reloaded and the changes still be visible?
I need to save the document to a database (or file system) and then load it on a different PC/user later on for review.
I presume it needs to be Exported using a FormatProvider - but can't find any documentation detailing the steps.
Thanks
I wonder if it's possible. Please refer below picture.
Provide us the Editable WPF RadGridView GroupHeader text value example. So that we can rename the Group Header value by double click on header. Our grid view code is -
<telerik:RadGridView x:Name="Gridview" AutoGenerateColumns="False" ShowGroupPanel="False" ValidatesOnDataErrors="None"
AllowDrop="True" CanUserDeleteRows="True" CanUserInsertRows="True" CanUserSelect="True" CanUserSortGroups="True"
AutoExpandGroups="True" GroupRenderMode="Nested" ItemsSource="{Binding SelectedItems}"
SelectionMode="Extended">
<telerik:RadGridView.GroupHeaderTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<CheckBox x:Name="grpCheckbox" IsThreeState="True">
<i:Interaction.Behaviors>
<behaviors:GroupSelectionBehavior/>
</i:Interaction.Behaviors>
</CheckBox>
<TextBlock Foreground="Black" Text="{Binding Group.Key}" FontWeight="Bold" ForceCursor="True"/>
</StackPanel>
</DataTemplate>
</telerik:RadGridView.GroupHeaderTemplate>