or
public UserControl1() { InitializeComponent(); this.DataContext = this; Rad.Item = new object() { }; } public string longStringVal_ { get { return (string)GetValue(longStringVal); } set { SetValue(longStringVal, value); } }public static readonly DependencyProperty longStringVal = DependencyProperty.Register( "longStringVal_", typeof(string), typeof(TextBox) );<Grid> <telerik:RadPropertyGrid x:Name="Rad" > <telerik:RadPropertyGrid.PropertyDefinitions> <telerik:PropertyDefinition DisplayName="LongStr" OrderIndex="-1" > <telerik:PropertyDefinition.EditorTemplate> <DataTemplate> <TextBox MinLines="3" MaxLines="3" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="true" x:Name="longStringValue" Text="{Binding Path = longStringVal_, Mode=TwoWay}" /> </DataTemplate> </telerik:PropertyDefinition.EditorTemplate> </telerik:PropertyDefinition> </telerik:RadPropertyGrid.PropertyDefinitions> </telerik:RadPropertyGrid></Grid>public class Entry : PropertyChangedBase{ private string name; public string Name { get { return this.name; } set { this.name = value; this.NotifyOfPropertyChange(() => this.Name); this.description = "new content of a description cell"; this.NotifyOfPropertyChange(() => this.Description); } } private string description; public string Description { get { return this.description; } set { this.description = value; this.NotifyOfPropertyChange(() => this.Description); } } public override int GetHashCode() { return 145; }}


var columns = mainViewModel.Records.First() .Properties .Select((x, i) => new { Name = x.Name, DataType = x.DataType, Index = i }) .ToArray(); foreach (var column in columns) { var binding = new Binding(string.Format("Properties[{0}].Value", column.Index)); GridViewDataColumn col = new GridViewDataColumn(); col.UniqueName = column.Name; col.Header = column.Name; col.DataMemberBinding = binding; col.DataType = column.DataType; col.IsSortable = true; fleetGrid.Columns.Add(col); }