<Page x:Class="Bug_Demo_ComboBoxColumn_Scroll.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300" Title="Page1"> <Grid> <telerik:RadGridView Name="dgDynGrid" AutoGenerateColumns="False" EnableColumnVirtualization="True" EnableRowVirtualization="True" ShowGroupPanel="False" IsFilteringAllowed="False" DataLoadMode="Asynchronous" CanUserInsertRows="True" CanUserResizeColumns="False" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" /> </Grid> </Page>
public class Persons { public int Id { get; set; } public string Name { get; set; } public string PlaceId { get; set; } }
public class Place { public int PlaceId { get; set; } public string PlaceName { get; set; } }
List<Place> places = new List<Place>(); for (int i = 0; i < 3000; i++) { Place p = new Place(); p.PlaceId = i; p.PlaceName = "PlaceWithID" + i.ToString(); places.Add(p); } List<Persons> persons = new List<Persons>(); for (int i = 0; i < 3000; i++) { Persons p = new Persons(); p.Id = i; p.PlaceId = i.ToString(); persons.Add(p); }
Telerik.Windows.Controls.GridViewComboBoxColumn column = new Telerik.Windows.Controls.GridViewComboBoxColumn(); column.DataMemberBinding = new Binding("PlaceId"); column.DisplayMemberPath = "PlaceName"; column.SelectedValueMemberPath = "PlaceId"; column.ItemsSource = places; dgDynGrid.Columns.Add(column); dgDynGrid.ItemsSource = persons;

<
telerik:RadTreeListView x:Name="rtlvPeopleInfo" >
<telerik:RadTreeListView.Columns>
<telerik:GridViewDataColumn x:Name="gvcPlanFinish" DataMemberBinding="{Binding PlanEndDate}" Header="Plan Finish"
Background="{Binding PlanEndDate, Converter={StaticResource PlanFinishBackColorConverterKey}}"
DataFormatString="{}{0:MM-dd-yyyy}" />
</telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>
But if i am doing the same in code behind with data template that works fine
private
void SetValueConvertersInColumns()
{
GridViewDataColumn gvcPlanFinish = new GridViewDataColumn();
FrameworkElementFactory tbPlanWork = new FrameworkElementFactory(typeof(TextBlock));
Binding bndText = new Binding("PlanEndDate");
bndText.Mode =
BindingMode.TwoWay;
tbPlanWork.SetBinding(
TextBlock.TextProperty, bndText);
Binding bndPlanWorkBackGround = new Binding("PlanEndDate");
bndPlanWorkBackGround.Converter =
this.FindResource("PlanFinishBackColorConverterKey") as IValueConverter;
tbPlanWork.SetBinding(
TextBlock.BackgroundProperty, bndPlanWorkBackGround);
DataTemplate dataTemplate = new DataTemplate();
dataTemplate.VisualTree = tbPlanWork;
gvcPlanFinish.CellTemplate = dataTemplate;
gvcPlanFinish.CellTemplate.Seal();
gvcPlanFinish.DataMemberBinding =
new Binding("PlanEndDate");
rtlvTreeListView.Columns.Add(gvcPlanFinish); //Adding the new column
}
<telerik:RadWindow x:Name="WindowNewPerson" Width="800" Height="626" Header="Test ..." WindowStartupLocation="CenterScreen" telerik:StyleManager.Theme="Windows7" FontFamily="Verdana" IsRestricted="True" ResizeMode="NoResize" > <telerik:RadWindow.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="White"/> <GradientStop Color="#FFE5EAEC" Offset="1"/> </LinearGradientBrush> </telerik:RadWindow.Background> <telerik:RadWindow.Effect> <DropShadowEffect BlurRadius="50" ShadowDepth="10" Opacity="0.5" Direction="290" RenderingBias="Performance"/> </telerik:RadWindow.Effect> <local:ScrNewPerson x:Name="CtlNewPerson"/> </telerik:RadWindow>public void Load(string htmlInput) {HtmlFormatProvider provider = new HtmlFormatProvider(); RadDocument telDoc = provider.Import(input); telerikTextBox.Document = telDoc; //spellchecker language anpassen telerikTextBox.IsSpellCheckingEnabled = false; this.telerikTextBox.SpellChecker.SpellCheckingCulture = new CultureInfo("en-US");}
LoadImageFromUrlevent from HtmlImportSettings
Bitmap image = new Bitmap(16, 16); void settings_LoadImageFromUrl(object sender, LoadImageEventArgs e) { if (e != null) { MemoryStream memStream = new MemoryStream(); image.Save(memStream, ImageFormat.Bmp); e.ImageElement.Init(memStream, ".bmp"); } }
I have a problem changing a property of the RadTileView control (e.g. IsEnabled) using the properties panel. I get always an error message. I did the following steps:
Error message in MainWindow:
Ambiguous match found. at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) at System.Type.GetProperty(String name) at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsDirect() at System.ComponentModel.DependencyPropertyDescriptor.FromProperty(DependencyProperty dependencyProperty, Type targetType) at Microsoft.Expression.Platform.WPF.WpfDependencyPropertyImplementation.get_Attributes() at Microsoft.Expression.DesignModel.Metadata.DependencyPropertyReferenceStep.get_Attributes() at Microsoft.Expression.DesignModel.Metadata.ClrObjectMetadata.InitializeAlternateContentPropertiesIfNecessary() at Microsoft.Expression.DesignModel.Metadata.ClrObjectMetadata.GetContentProperties() at Microsoft.Expression.DesignModel.Metadata.ClrObjectMetadata.get_ContentProperties() at Microsoft.Expression.DesignModel.Core.ViewNodeManager.InvalidateInternal(List`1 invalidRoots, Boolean forceValidateExpressionCache) at Microsoft.Windows.Design.Platform.ViewProducerBase.ApplyUpdate(Delta delta) at Microsoft.Windows.Design.Platform.ViewProducerBase.IncrementalRebuild(DocumentTreeManager tree, Damage damage) at Microsoft.Windows.Design.Platform.ViewProducerBase.UpdateView(DocumentTreeManager tree, Damage damage) at Microsoft.Windows.Design.DocumentModel.ViewProducer.UpdateView(UpdateDamageArguments args)