Telerik Forums
UI for WPF Forum
2 answers
138 views
I noticed that rows of hierarchy child aren't virtualized. So If I have a child table with 500 rows, 500 UI controls will be generated for each of the rows. You can use Snoop to see that. (Rows of root table, at the top of the hierarchy are virtualized, as expected).

Is there a way to extend virtualization to support child tables? If not, is there a plan to support it in the future?
Yaakov Davis
Top achievements
Rank 1
 answered on 27 Dec 2010
3 answers
102 views
having any rad text box in WPF?

if possible mean give me some suggession?
if i use visual studio 2010 text box mean rad properties may assign in the textbox also?
or give me suitable solution.
Vanya Pavlova
Telerik team
 answered on 27 Dec 2010
1 answer
88 views
Hello i am geting this excpetion when i am populating sheduleview from db. It is possible to bind a list with more than 250 or 300 appointments?  
Because I am getting this exception.
 
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Telerik.Windows.Controls.AppointmentsHelper.SplitToColumns(AppointmentSlotGroupInfo groupInfo, Boolean roundAppointmentDurationToDay) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Helpers\AppointmentsHelper.cs:line 330
   at Telerik.Windows.Controls.GroupHeader.CalculateAppointmentItemRenderRectangle() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\GroupHeader.cs:line 565
   at Telerik.Windows.Controls.GroupHeader.set_CalculatedChildrenLength(Double value) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\GroupHeader.cs:line 200
   at Telerik.Windows.Controls.GroupHeader.SetAvailableLength(Double availableLength, Boolean isHorizontal) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\GroupHeader.cs:line 459
   at Telerik.Windows.Controls.AppointmentsPanel.UpdateHeaderAvailableSize(List`1 headers, Boolean isHorizontal, Double availableLength, Boolean initialize, Boolean updateDesiredLengthForLevel) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\AppointmentsPanel.cs:line 617
   at Telerik.Windows.Controls.AppointmentsPanel.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\AppointmentsPanel.cs:line 139
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at Telerik.Windows.Media.Imaging.ExportHelper.GetBitmapSource(FrameworkElement element, Double dpiX, Double dpiY) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\ExportExtensions\ExportHelper.cs:line 85
   at Telerik.Windows.Media.Imaging.ExportHelper.GetElementImage(FrameworkElement element) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\ExportExtensions\ExportHelper.cs:line 63
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.PrepareAnimation() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\TransitionControl\TransitionPresenter.cs:line 341
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.ChangeContent() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\TransitionControl\TransitionPresenter.cs:line 426
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.OnContentChange(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\TransitionControl\TransitionPresenter.cs:line 381
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.set_CurrentContent(Object value) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\TransitionControl\TransitionPresenter.cs:line 161
   at Telerik.Windows.Controls.RadTransitionControl.OnContentChanged(Object oldContent, Object newContent) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Core\Controls\TransitionControl\RadTransitionControl.cs:line 168
   at System.Windows.Controls.ContentControl.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.StyleHelper.InvalidateDependents(Style ownerStyle, FrameworkTemplate frameworkTemplate, DependencyObject container, DependencyProperty dp, FrugalStructList`1& dependents, Boolean invalidateOnlyContainer)
   at System.Windows.StyleHelper.OnTriggerSourcePropertyInvalidated(Style ownerStyle, FrameworkTemplate frameworkTemplate, DependencyObject container, DependencyProperty dp, DependencyPropertyChangedEventArgs changedArgs, Boolean invalidateOnlyContainer, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalMap& propertyTriggersWithActions, Int32 sourceChildIndex)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyPropertyKey key, Object value)
   at Telerik.Windows.Controls.RadScheduleView.set_CurrentVisibleRangeText(String value) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\RadScheduleView.cs:line 94
   at Telerik.Windows.Controls.RadScheduleView.UpdateCurrentVisibleRangeText() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\RadScheduleView.cs:line 136
   at Telerik.Windows.Controls.RadScheduleView.UpdateVisibleRange() in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\RadScheduleView.cs:line 178
   at Telerik.Windows.Controls.ScheduleViewBase.OnCurrentDatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF_2010_Q3\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.cs:line 2719
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)
Boyan
Telerik team
 answered on 27 Dec 2010
0 answers
93 views

Hi,

I have a screen in which i am required to place both RadChart and RadScheduleView . RadChart has some data associated with it, and RadScheduleView has no data. When I add the reference for RadScheduleView , which is "Telerik.Windows.Controls.ScheduleView", the data which is associated with the charts are no longer visible and in place of that data, random data like " Chart axis label, ChartChartTitle" etc appears. Why is this happening, and how can this be solved? Please refer attached images of the Radcharts showing the random data. Also, Please refer the following link for sample code regarding the mentioned error.

http://www.filedropper.com/radchartbug

-Sangeetha

Sang
Top achievements
Rank 1
 asked on 26 Dec 2010
4 answers
414 views

Hello

I'm trying to set default values for a DataRow when it is newly inserted into a RadGridView. See the cut down sample below.
If I use AddingNewDataItem to create the row, then I get an error.
If instead I let the grid create the row, and then use BeginningEdit to set the values, then the values don't show.

What's the best way to set default values with a new DataRow?

Many Thanks



public
partial class MainWindow : Window

{

       private RadGridView _grid;

       private DataTable _table;

 


       public MainWindow()

       {

              InitializeComponent();

 


              _grid = new RadGridView { AutoGenerateColumns = false, CanUserInsertRows = true, ShowInsertRow = true };

              Content = _grid;

      

              _grid.AddingNewDataItem += new EventHandler<GridViewAddingNewEventArgs>( _grid_AddingNewDataItem );

              _grid.BeginningEdit += new EventHandler<GridViewBeginningEditRoutedEventArgs>( _grid_BeginningEdit );

 


              _grid.Columns.Add( new GridViewDataColumn { DataMemberBinding = new Binding { Path = new PropertyPath( "Column1" ), Mode = BindingMode.TwoWay } } );

              _grid.Columns.Add( new GridViewDataColumn { DataMemberBinding = new Binding { Path = new PropertyPath( "Column2" ), Mode = BindingMode.TwoWay } } );

 


              _table = new DataTable();

              _table.Columns.Add( "Column1", typeof( string ) );

              _table.Columns.Add( "Column2", typeof( string ) );

              _table.Rows.Add( "row1-col1", "row1-col2" );

              _grid.ItemsSource = _table.DefaultView;

       }

 


       private void _grid_BeginningEdit( object sender, GridViewBeginningEditRoutedEventArgs e )

       {

              // This won't show "INIT" until Column2 is focused

              //DataRowView dataRowView = e.Row.Item as DataRowView;

              //if( dataRowView.Row.RowState == DataRowState.Detached )

              //{

              //    dataRowView[ "Column2" ] = "INIT";

              //}

       }

 


       private void _grid_AddingNewDataItem( object sender, GridViewAddingNewEventArgs e )

       {

              // This will cause an error: Cannot add external objects to this list

              //e.NewObject = _table.DefaultView.AddNew();

       }

}

Steve
Top achievements
Rank 1
 answered on 26 Dec 2010
1 answer
98 views
I'm trying to add a gauge to an existing wrapPanel but I'm doing something wrong. my code is :

Grid newGrid = new Grid();
RadGauge newRG =
new RadGauge();
LinearGauge newLG = new LinearGauge();
LinearScale newLS = new LinearScale();
IndicatorList newIL = new IndicatorList();
Marker newMarker = new Marker();
 
newIL.Items.Add(newMarker);
newLS.Indicators.Add(newIL);
newLG.Items.Add(newLS);
newRG.Content = newLG;
newGrid.Children.Add(newRG);
GaugesWrapPanle.Children.Add(newGrid);

The error I get is :
"Unable to cast object of type 'Telerik.Windows.Controls.Gauges.IndicatorList' to type 'Telerik.Windows.Controls.Gauges.IGaugeIndicator'".

Could you please write the right way for doing this?

Thank you
David
Top achievements
Rank 1
 answered on 25 Dec 2010
2 answers
311 views

Hi, I'm new to telerik and I would like to ask a question here in the forum.

Basically, I would like to make  "Property Editor" using Dictionary and RadGridView.

I'm using Dictionary because all I have is bunch of key/value pairs and entries/definition can frequently change. I thought Dictionary was perfect for this.

The below source code works to bind Dictionary in RadGridView but editing value would not work. Any changes made in RadGridView will not change the values in the Dictionary.
It is obvious that Dictionary doesn't support two-way binding.
I'm was wondering how I can enable Dictionary to edit values.
Is there a trick to do that?

If Dictionary inheritantely does not allow two-way/one-way binding, could you please give a suggestion how I can emulate Dictionary like functionality?

Thank you very much.

-Chris

publicvoid
 ShowEntityProperties(OrderedDictionary propertyDict)
  {
   PropertyGridView.ItemsSource = null;
   PropertyGridView.Items.Clear();
   PropertyGridView.ItemsSource = propertyDict;

  }

Chris
Top achievements
Rank 1
 answered on 24 Dec 2010
1 answer
179 views
I am able to bind datatable to rad grid view..Is the reverse possible , with directly accepting the changes from rad gridview ?
Pavel Pavlov
Telerik team
 answered on 24 Dec 2010
4 answers
85 views
Hi, 
i have a Problem in dragging object with collapsed Grid,Canvas,DockPanel    using RadDragDropManager.
I have an user Control like this :
<UserControl>
  <StackPanel>
   <Grid_1>
     <label>
     <myUserControl_1>
   </Grid>
   <Grid_2>
    <label>
    <myUserControl_2>
  </Grid>
   <Grid_3>
    <label>
    <myUserControl_3>
  </Grid>
</Grid>
</StackPanel>

In run time mode i collapse one of these Grid. (for example Grid_2)
When i try to drag onto myUserControl_1 i received OnDrop Event on myUserControl_2.
What's Wrong?
Anyone still get the same problem ?
Thanks.

Bye
Claudio
Top achievements
Rank 1
 answered on 24 Dec 2010
4 answers
261 views
hi!

I would like to template RadComboBox, so I generated a copy of template by using blend, this is template generated:

<ControlTemplate x:Key="RadComboBoxControlTemplate1" TargetType="{x:Type telerik:RadComboBox}">
    <Grid x:Name="VisualRoot">
        <Border Background="{TemplateBinding Background}" CornerRadius="1" IsHitTestVisible="False"/>
        <telerik:RadToggleButton x:Name="PART_DropDownButton" ClickMode="Press" IsTabStop="False" Margin="0" Padding="0">
            <telerik:RadToggleButton.Template>
                <ControlTemplate TargetType="{x:Type telerik:RadToggleButton}">
                    <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                </ControlTemplate>
            </telerik:RadToggleButton.Template>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Telerik_Windows_Controls_Chromes:ButtonChrome x:Name="ButtonChrome" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" CornerRadius="1" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsDropDownOpen}" RenderFocused="{TemplateBinding IsFocused}" RenderEnabled="{TemplateBinding IsEnabled}">
                    <telerik:StyleManager.Theme>
                        <telerik:Office_BlackTheme/>
                    </telerik:StyleManager.Theme>
                </Telerik_Windows_Controls_Chromes:ButtonChrome>
                <ContentControl x:Name="DropDownIcon" Background="White" Grid.Column="1" Foreground="Black" IsTabStop="False">
                    <ContentControl.Template>
                        <ControlTemplate TargetType="{x:Type ContentControl}">
                            <Grid Margin="5,0">
                                <Path x:Name="BackgroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Background}" Height="3" Margin="0,2,0,0" Stretch="Fill" Width="5"/>
                                <Path x:Name="ForegroundIcon" Data="M0,0L2,0 1,1z" Fill="{TemplateBinding Foreground}" Height="3" Margin="0,1" Stretch="Fill" Width="5"/>
                            </Grid>
                        </ControlTemplate>
                    </ContentControl.Template>
                </ContentControl>
                <ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" Grid.Column="0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            </Grid>
        </telerik:RadToggleButton>
        <Popup x:Name="PART_Popup" AllowsTransparency="True" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="White" CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding MinDropDownWidth}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <telerik:RadButton x:Name="PART_ClearButton" Content="{TemplateBinding ClearSelectionButtonContent}" Margin="-1,-1,-1,0" Grid.Row="0" Visibility="{TemplateBinding ClearSelectionButtonVisibility}">
                        <telerik:StyleManager.Theme>
                            <telerik:Office_BlackTheme/>
                        </telerik:StyleManager.Theme>
                    </telerik:RadButton>
                    <ScrollViewer x:Name="PART_ScrollViewer" BorderThickness="0" CanContentScroll="True" Padding="1,1,1,0" Grid.Row="1" VerticalScrollBarVisibility="Auto">
                        <telerik:StyleManager.Theme>
                            <telerik:Office_BlackTheme/>
                        </telerik:StyleManager.Theme>
                        <ItemsPresenter/>
                    </ScrollViewer>
                </Grid>
            </Border>
        </Popup>
    </Grid>
    <ControlTemplate.Triggers>
        <Trigger Property="IsEnabled" Value="False">
            <Setter Property="Opacity" TargetName="Content" Value="0.5"/>
            <Setter Property="Foreground" TargetName="DropDownIcon" Value="#FF8D8D8D"/>
            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
        </Trigger>
        <MultiTrigger>
            <MultiTrigger.Conditions>
                <Condition Property="IsEnabled" Value="True"/>
                <Condition Property="IsMouseOver" Value="True"/>
            </MultiTrigger.Conditions>
            <Setter Property="Foreground" TargetName="DropDownIcon" Value="Black"/>
            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
        </MultiTrigger>
        <MultiTrigger>
            <MultiTrigger.Conditions>
                <Condition Property="IsEnabled" Value="True"/>
                <Condition Property="IsDropDownOpen" Value="True"/>
            </MultiTrigger.Conditions>
            <Setter Property="Foreground" TargetName="DropDownIcon" Value="Black"/>
            <Setter Property="Background" TargetName="DropDownIcon" Value="White"/>
        </MultiTrigger>
    </ControlTemplate.Triggers>
</ControlTemplate>

I would like to change black triangle DropDownIcon to my own image, how can I do this???

thanks
ENTERPRISE INTERNATIONAL SAS
Top achievements
Rank 1
 answered on 23 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?