Telerik Forums
UI for WPF Forum
3 answers
255 views
Hello,
I have quite complex object with joins and sub-queries to display on grid. Currently I'm getting only 1000 records from database to get better performance. I would really like to have benefits from grid filtering, sorting, server side virtualization, and paging to enable in rare cases uses to go through all data. However I didn't find any way or information how to to do that with complex select data. This data is currently collected 100% using Entity Framework. I've looked to use yours entity framework data source but it only allows simple usage - native entities not complex custom joins.

Could you advice me how to achieve that?
Rossen Hristov
Telerik team
 answered on 19 Jun 2013
2 answers
156 views
Hi,
I try to replace all inlineUIContainers in RadDocument by SpanBoxes. I know how to do it at caretposition using Delete as,
DocumentPosition currentPosition = radRichTextBox1.Document.CaretPosition;
radRichTextBox1.Document.Delete(false, currentPosition);
radRichTextBox1.Insert(text);

However I am not sure how to get documentpostion for each inlineUIContainers. I need help on this.

Thanks,
York
Boby
Telerik team
 answered on 19 Jun 2013
1 answer
62 views
Hi telerik,

I'm trying to make the move from 'old school' d'n'd to the new based on latest release. I've tried to follow you example in documentation.
However, no events are activated. The dragged item is moved to new location, completely handled by the treeview (and none of my code discovers it).

Any suggestions on what to do?

Thanks,

Anders

xaml:
<Controls:RadTreeView
           ItemsSource="{Binding Path=WorkspaceViewModel.Children, NotifyOnSourceUpdated=True}"
           Name="treeview"
           IsLineEnabled="True"
           MouseRightButtonDown="TreeviewMouseRightButtonDown"
           IsDragDropEnabled="True"
           SelectionMode="Single"
           MouseLeftButtonDown="TreeviewMouseLeftButtonDown"
           IsEditable="{Binding CommandHandlerViewModel.CanEditSelected}"
           ItemEditTemplate="{StaticResource edittemplate}"
           >
            
           <Controls:RadTreeView.Resources>
               <Style TargetType="Controls:RadTreeView">
                   <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True"></Setter>
               </Style>
           </Controls:RadTreeView.Resources>


In the constructor of the usercontrol, holding the treeview:

DragDropManager.AddDragInitializeHandler(treeview, OnDragInitialize);
 
DragDropManager.AddGiveFeedbackHandler(treeview, OnGiveFeedback1);
 
DragDropManager.AddDragDropCompletedHandler(treeview, OnDragCompleted1);
 
DragDropManager.AddDropHandler(treeview, OnDrop1);

None of them are implemented yet -- I'm expecting an exception:
private void OnDragCompleted1(object sender, DragDropCompletedEventArgs e)
{
    throw new NotImplementedException();
}
 
private void OnDrop1(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
    throw new NotImplementedException();
}
 
private void OnGiveFeedback1(object sender, GiveFeedbackEventArgs e)
{
    throw new NotImplementedException();
}
 
private void OnDragInitialize(object sender, DragInitializeEventArgs e)
{
    throw new NotImplementedException();
}
Anders
Top achievements
Rank 1
 answered on 18 Jun 2013
2 answers
842 views
Just updated the Wpf binaries to the latest 4.0 release and now I am getting 'GridViewGroupRow' TargetType does not match type of element 'GroupHeaderRow' error.

All references/dlls updated with 2013.2.611.40
xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"



Here is the Treeview I did not include the Gridview Data Columns

<telerik:RadGridView x:Name="radGridView"
                            ShowGroupPanel="True"                                                     
                            ColumnWidth="*"
                            IsReadOnly="True" 
                            VerticalAlignment="Stretch"
                            HorizontalAlignment="Stretch"
                            Background="Transparent"
                            Grid.Row="0"
                            Grid.RowSpan="4"
                            SelectionMode="Single"
                            Grid.Column="1"                             
                            BorderThickness="0"
                            FontFamily="Segoe UI"
                            FontSize="12"
                            CanUserFreezeColumns="False"
                            RowIndicatorVisibility="Collapsed"
                            MouseDoubleClick="myGridView_MouseDoubleClick"
                            CanUserResizeColumns="True"                                                                                      
                            AutoGenerateColumns="False"
                            ItemsSource="{Binding Path=SearchStuff}"
                            SelectedItem="{Binding Path=SelectedSearchStuff, Mode=TwoWay}"
                            GroupPanelStyle="{DynamicResource GridViewGroupPanelStyle1}"
                            GroupRenderMode="Flat"                            
                            GroupRowStyle="{DynamicResource GridViewGroupRowStyle1}">

 

TreeView Resources

 

<telerik:RadGridView.Resources>
               <Style x:Key="GridViewGroupPanelStyle1" TargetType="{x:Type telerik:GridViewGroupPanel}">
                   <Setter Property="Template">
                       <Setter.Value>
                           <ControlTemplate TargetType="{x:Type telerik:GridViewGroupPanel}">
                               <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Height="36">
                                   <VisualStateManager.VisualStateGroups>
                                       <VisualStateGroup x:Name="Grouping">
                                           <VisualState x:Name="NoGroups"/>
                                           <VisualState x:Name="HasGroups">
                                               <Storyboard>
                                                   <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="panelText">
                                                       <DiscreteObjectKeyFrame KeyTime="0">
                                                           <DiscreteObjectKeyFrame.Value>
                                                               <Visibility>Collapsed</Visibility>
                                                           </DiscreteObjectKeyFrame.Value>
                                                       </DiscreteObjectKeyFrame>
                                                   </ObjectAnimationUsingKeyFrames>
                                                   <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="panelTextGrouped">
                                                       <DiscreteObjectKeyFrame KeyTime="0">
                                                           <DiscreteObjectKeyFrame.Value>
                                                               <Visibility>Visible</Visibility>
                                                           </DiscreteObjectKeyFrame.Value>
                                                       </DiscreteObjectKeyFrame>
                                                   </ObjectAnimationUsingKeyFrames>
                                               </Storyboard>
                                           </VisualState>
                                       </VisualStateGroup>
                                   </VisualStateManager.VisualStateGroups>
                                   <Border BorderBrush="#FFEFF6FF" BorderThickness="0" Background="{TemplateBinding Background}" >
                                       <StackPanel Orientation="Horizontal">
                                           <TextBlock x:Name="panelText" FontFamily="Segoe UI" FontSize="12" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" telerik:LocalizationManager.ResourceKey="GridViewGroupPanelText" Text="Drag a column header and drop it here to group by that column" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"><Run/></TextBlock>
                                           <TextBlock x:Name="panelTextGrouped" FontFamily="Segoe UI" FontSize="12" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" telerik:LocalizationManager.ResourceKey="GridViewGroupPanelTopTextGrouped" Text="Grouped by:" Visibility="Collapsed" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"><Run/></TextBlock>
                                           <ItemsPresenter VerticalAlignment="Center"/>
                                       </StackPanel>
                                       <Border.Effect>
                                           <DropShadowEffect Color="Black" Opacity=".2" BlurRadius="4" ShadowDepth="2" Direction="270" />
                                       </Border.Effect>
                                   </Border>
                               </Border>
                           </ControlTemplate>
                       </Setter.Value>
                   </Setter>
                   <Setter Property="ItemsPanel">
                       <Setter.Value>
                           <ItemsPanelTemplate>
                               <StackPanel IsItemsHost="True" Orientation="Horizontal" VerticalAlignment="Stretch"/>
                           </ItemsPanelTemplate>
                       </Setter.Value>
                   </Setter>
                   <Setter Property="MinHeight" Value="32"/>
                   <Setter Property="Margin" Value="0"/>
                   <Setter Property="Padding" Value="10,0,3,0"/>
                   <Setter Property="Background">
                       <Setter.Value>
                           <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                               <GradientStop Color="#FFDFDFDF" Offset="1"/>
                               <GradientStop Color="#FFBABABA"/>
                           </LinearGradientBrush>
                       </Setter.Value>
                   </Setter>
                   <Setter Property="BorderBrush" Value="#FF848484"/>
                   <Setter Property="BorderThickness" Value="0,0,0,1"/>
                   <Setter Property="VerticalContentAlignment" Value="Center"/>
                   <Setter Property="HorizontalContentAlignment" Value="Left"/>
                   <Setter Property="SnapsToDevicePixels" Value="True"/>
               </Style>
               <Style x:Key="GridViewGroupRowStyle1" TargetType="{x:Type grid:GridViewGroupRow}">
                   <Setter Property="Template">
                       <Setter.Value>
                           <ControlTemplate TargetType="{x:Type grid:GridViewGroupRow}">
                               <Grid x:Name="PART_GroupExpanderGrid">
                                   <Grid.ColumnDefinitions>
                                       <ColumnDefinition Width="Auto"/>
                                       <ColumnDefinition Width="Auto"/>
                                       <ColumnDefinition Width="*"/>
                                   </Grid.ColumnDefinitions>
                                   <Grid.RowDefinitions>
                                       <RowDefinition x:Name="PART_HeaderRow" MinHeight="{TemplateBinding MinHeight}"/>
                                       <RowDefinition x:Name="ContentRow" Height="Auto"/>
                                   </Grid.RowDefinitions>
 
 
                                   <VisualStateManager.VisualStateGroups>
                                       <VisualStateGroup x:Name="ExpandStateGroup">
                                           <VisualState x:Name="Expanded">
                                               <Storyboard>
                                                   <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Content">
                                                       <DiscreteObjectKeyFrame KeyTime="0">
                                                           <DiscreteObjectKeyFrame.Value>
                                                               <Visibility>Visible</Visibility>
                                                           </DiscreteObjectKeyFrame.Value>
                                                       </DiscreteObjectKeyFrame>
                                                   </ObjectAnimationUsingKeyFrames>
                                                   <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="BottomBorder" >
                                                       <DiscreteObjectKeyFrame KeyTime="0">
                                                           <DiscreteObjectKeyFrame.Value>
                                                               <Visibility>Visible</Visibility>                                                               
                                                           </DiscreteObjectKeyFrame.Value>
                                                       </DiscreteObjectKeyFrame>
                                                   </ObjectAnimationUsingKeyFrames>
                                                   <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="IconOuterBorder">
                                                       <DiscreteObjectKeyFrame KeyTime="0">
                                                           <DiscreteObjectKeyFrame.Value>
                                                               <Thickness>0</Thickness>
                                                           </DiscreteObjectKeyFrame.Value>
                                                       </DiscreteObjectKeyFrame>
                                                   </ObjectAnimationUsingKeyFrames>
                                                   <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="IconInnerBorder">
                                                       <DiscreteObjectKeyFrame KeyTime="0">
                                                           <DiscreteObjectKeyFrame.Value>
                                                               <Thickness>1,1,0,0</Thickness>
                                                           </DiscreteObjectKeyFrame.Value>
                                                       </DiscreteObjectKeyFrame>
                                                   </ObjectAnimationUsingKeyFrames>
                                                   <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="ExpanderButton">
                                                       <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="180"/>
                                                   </DoubleAnimationUsingKeyFrames>
                                               </Storyboard>
                                           </VisualState>
                                           <VisualState x:Name="Collapsed">
                                               <Storyboard>
                                                   <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="ExpanderButton">
                                                       <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                                   </DoubleAnimationUsingKeyFrames>
                                               </Storyboard>
                                           </VisualState>
                                       </VisualStateGroup>
                                   </VisualStateManager.VisualStateGroups>
                                   <Border x:Name="ToggleButtonBorder" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.Column="2" MinHeight="{TemplateBinding MinHeight}" telerik:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                                       <Grid>
                                           <Grid.ColumnDefinitions>
                                               <ColumnDefinition Width="25"/>
                                               <ColumnDefinition Width="Auto"/>
                                               <ColumnDefinition Width="*"/>
                                           </Grid.ColumnDefinitions>
                                           <Border Grid.Column="2" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" telerik:SelectiveScrollingGrid.SelectiveScrollingClip="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                               <Border.Visibility>
                                                   <Binding Path="ShowHeaderAggregates" RelativeSource="{RelativeSource TemplatedParent}">
                                                       <Binding.Converter>
                                                           <telerik:BooleanToVisibilityConverter/>
                                                       </Binding.Converter>
                                                   </Binding>
                                               </Border.Visibility>
                                               <telerik:AggregateResultsList HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                                   <telerik:AggregateResultsList.ItemsPanel>
                                                       <ItemsPanelTemplate>
                                                           <StackPanel IsItemsHost="True" Orientation="Horizontal"/>
                                                       </ItemsPanelTemplate>
                                                   </telerik:AggregateResultsList.ItemsPanel>
                                                   <telerik:AggregateResultsList.ItemTemplate>
                                                       <DataTemplate>
                                                           <telerik:GridViewAggregateResultCell AggregateResult="{Binding}" IsTabStop="False">
                                                               <telerik:StyleManager.Theme>
                                                                   <telerik:Office_BlackTheme/>
                                                               </telerik:StyleManager.Theme>
                                                           </telerik:GridViewAggregateResultCell>
                                                       </DataTemplate>
                                                   </telerik:AggregateResultsList.ItemTemplate>
                                               </telerik:AggregateResultsList>
                                           </Border>
                                           <Border x:Name="IconOuterBorder" BorderBrush="Transparent" BorderThickness="0,0,0,0" Background="Transparent" HorizontalAlignment="Stretch" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                                               <Border x:Name="IconInnerBorder" BorderBrush="White" BorderThickness="1,1,0,1">
                                                   <Path x:Name="ExpanderButton" Grid.Column="0" Data="M0,0L1,0 2,0 2,0.99999991 3,0.99999991 3,2 4,2 4,0.99999991 5,0.99999991 5,0 5.9999999,0 7,0 7,0.99999991 5.9999999,0.99999991 5.9999999,2 5,2 5,3 4,3 4,4 3,4 3,3 2,3 2,2 1,2 1,0.99999991 0,0.99999991z" Fill="Black" HorizontalAlignment="Left" Height="5" Margin="{TemplateBinding Padding}" RenderTransformOrigin="0.5,0.5" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Width="7">
                                                       <Path.RenderTransform>
                                                           <RotateTransform/>
                                                       </Path.RenderTransform>
                                                   </Path>
                                               </Border>
                                           </Border>
                                           <ToggleButton x:Name="HeaderButton" Background="{TemplateBinding Background}" Grid.ColumnSpan="3" Grid.Column="0" IsTabStop="{TemplateBinding IsTabStop}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Opacity="0" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical"/>
                                           <ToggleButton BorderBrush="{x:Null}" BorderThickness="0" Background="Transparent" Grid.Column="1" IsTabStop="{TemplateBinding IsTabStop}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Padding="0,0,10,0" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                                               <ToggleButton.Style>
                                                   <Style TargetType="{x:Type ToggleButton}">
                                                       <Setter Property="Template">
                                                           <Setter.Value>
                                                               <ControlTemplate TargetType="{x:Type ToggleButton}">
                                                                   <Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                                                                       <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                                                                   </Border>
                                                               </ControlTemplate>
                                                           </Setter.Value>
                                                       </Setter>
                                                       <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                                       <Setter Property="VerticalContentAlignment" Value="Center"/>
                                                       <Setter Property="Padding" Value="9,0,0,0"/>
                                                   </Style>
                                               </ToggleButton.Style>
                                               <ContentPresenter ContentTemplate="{TemplateBinding GroupHeaderTemplate}" Content="{TemplateBinding GroupViewModel}" Grid.Column="1" Margin="0,0,10,0" VerticalAlignment="Center"/>
                                           </ToggleButton>
                                           <Border BorderBrush="Transparent" BorderThickness="0,0,0,0" Grid.ColumnSpan="2" Grid.Column="1" telerik:SelectiveScrollingGrid.SelectiveScrollingClip="True">
                                               <Border BorderBrush="White" BorderThickness="0,1,1,1"/>
                                           </Border>
                                       </Grid>
                                   </Border>
                                   <Border x:Name="PART_IndicatorPresenter" BorderBrush="Transparent" BorderThickness="0,0,1,1" Grid.Column="0" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{TemplateBinding RowIndicatorVisibility}" VerticalAlignment="Stretch" Width="25">
                                       <Border BorderBrush="White" BorderThickness="1" Background="#FFE4E4E4"/>
                                   </Border>
                                   <telerik:IndentPresenter Background="{TemplateBinding Background}" Grid.Column="1" IsTabStop="False" IndentLevel="{TemplateBinding Level}" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
                                       <telerik:StyleManager.Theme>
                                           <telerik:Office_BlackTheme/>
                                       </telerik:StyleManager.Theme>
                                   </telerik:IndentPresenter>
                                   <Border x:Name="Content" Grid.ColumnSpan="5" Grid.Column="0" Grid.Row="1" Visibility="Collapsed">
                                       <StackPanel>
                                           <telerik:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel" CanHorizontallyScroll="False" CanVerticallyScroll="False"/>
                                           <telerik:GridViewGroupFooterRow x:Name="Footer" IsTabStop="False">
                                               <telerik:StyleManager.Theme>
                                                   <telerik:Office_BlackTheme/>
                                               </telerik:StyleManager.Theme>
                                           </telerik:GridViewGroupFooterRow>
                                       </StackPanel>
                                   </Border>
                                   <Border x:Name="BottomBorder"  BorderBrush="{StaticResource BasicBrush}" BorderThickness="0,0,0,0" Grid.Column="2" Grid.Row="1" telerik:SelectiveScrollingGrid.SelectiveScrollingClip="True" Visibility="Collapsed" VerticalAlignment="Bottom"/>
                               </Grid>
                           </ControlTemplate>
                       </Setter.Value>
                   </Setter>
                   <Setter Property="GroupHeaderTemplate">
                       <Setter.Value>
                           <DataTemplate>
                               <ContentPresenter Content="{Binding Header}"/>
                               
                           </DataTemplate>
                       </Setter.Value>
                   </Setter>
                   <Setter Property="Background" Value="#FFE4E4E4"/>
                   <Setter Property="BorderBrush" Value="Transparent"/>
                   <Setter Property="BorderThickness" Value="0"/>
                   <Setter Property="VerticalContentAlignment" Value="Center"/>
                   <Setter Property="HorizontalContentAlignment" Value="Left"/>
                   <Setter Property="Padding" Value="10,0,0,0"/>                   
                   <Setter Property="MinHeight" Value="25"/>
                   <Setter Property="AllowDrop" Value="True"/>
                   <Setter Property="SnapsToDevicePixels" Value="True"/>
               </Style>
               
           </telerik:RadGridView.Resources>

User Control Resources

<UserControl.Resources>
 
 
        <Style
        TargetType="grid:GridViewIndentCell">
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="BorderBrush" Value="{StaticResource BasicBrush}"/>
 
            <Setter Property="BorderThickness" Value="0,0,0,0"/>
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="0" />
 
            <Setter Property="SnapsToDevicePixels" Value="True" />
 
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="grid:GridViewIndentCell">
                        <Border BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}"
                            BorderThickness="{TemplateBinding BorderThickness}" Width="25" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
 
        <Style
        TargetType="grid:GridViewHeaderIndentCell">
 
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="grid:GridViewHeaderIndentCell">
 
                        <Border x:Name="OuterBorder" Width="25"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"/>
 
 
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderThickness" Value="0,0,0,0"/>
            <Setter Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
            <Setter Property="Background" Value="{StaticResource MainBrush}" />
            <Setter Property="VerticalContentAlignment" Value="Stretch" />
            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="0" />
 
            <Setter Property="SnapsToDevicePixels" Value="True" />
 
        </Style>
 
    </UserControl.Resources>

 


Bartley
Top achievements
Rank 1
 answered on 18 Jun 2013
1 answer
142 views
Hi I am trying to create teleric propertygrid-based user control that contains a multiline textbox, but I can't configure data-bindig.
exactly i can't call set for property
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>
Any help is much appreciated!

Ivan Ivanov
Telerik team
 answered on 18 Jun 2013
2 answers
90 views
I am using an editable RadGridView to present a collection of items of a class, which overrides the GetHashCode method in a way that hash codes are not unique. The problem is that in such a case changing property values from code is not reflected in grid cells. The problem is gone when hash codes are unique. 

I found a forum post from 2011 which says that GridView does not support items with non-unique hash codes.
My question is: Has it been fixed already? Is it planned to be fixed?
I perceive it as a bug, having in mind a rule that equal items have the same hashes, but equal hashes don't determine that objects are the same. I think that the grid should handle items with the same hash code properly.

---------------------------------------------------------------------------------------------------------

Some more details about my problem:

I simplified my class to the following one:
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;
    }
}

So behaviour of this class is the following:
- changing the Name column should also change the Description column
- hashcodes for multiple items may be the same

However, a grid which is bound to a collection of such items doesn't work as expected. After editing a Name column, the Description property gets updated, but the change is not visible in the grid. The Description cell gets updated only when I click on the cell and open its editor.
Paweł Polaczyk
Top achievements
Rank 1
 answered on 18 Jun 2013
1 answer
87 views
I use version: 2012_3_1129

There is an issue with docking control on 2 monitors. I have RadPane docked at the bottom and I turn on "Auto hide" option, so this pane hides.
The issue occurs when I my application window is wider than my first monitor and more than 50% is on the first monitor. In this case when I want to show my pane (docked bottom) which is hidden than it appears only on the first monitor and the part which should be present on the second monitor is not visible (right "x" button is not visible on that pane).
Georgi
Telerik team
 answered on 18 Jun 2013
6 answers
437 views
Hi There,

we dont want to use the below features of RadMaskedNumericInput

if we enter some digits in middle of the numeric value, the right side digits are overriding(in our case it should not override and should not allow the user to type any thing but to change the digit he can select the required digit/range and type to change)

Is it possible to change this behavior by overriding any thing ?

Regards,
Srinivas.


Ravi
Top achievements
Rank 1
 answered on 18 Jun 2013
1 answer
127 views
Hi all,
i'm trying to custom style my ScheduleView after migrating from Scheduler, its suppose to look the same as the Scheduler did(pictures attached).
I tried taking an already made Theme from your Themes.Implicit folder but i can't find the right parts to change, i need pointers to the right parts(their names/their styles names) in order to modify it properly(the file is huge and i can't find anything in there).

Best Regards,
Jonathan Bacalo
Masha
Telerik team
 answered on 18 Jun 2013
0 answers
81 views
Hi everyone,

I want to fill programmatically a WPF RadGridView control cell by cell.
How can I do it ?
I do not want to bind the RadGridView to a data source.

Any help will be greatly appreciated.
Pascal GUERY
Top achievements
Rank 1
 asked on 17 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?