Telerik Forums
UI for WPF Forum
1 answer
171 views
I have implemented a custom appointment class that is always recurring weekly.
When you hit the delete key on an appointment, neither the AppoinmentDeleting nor the AppointmentDeleted events are fired.
Likewise, these events are not fired if click the "X" button to delete the appointment and you do not select "Delete series" option.

I look forward to hearing any advise on how to handle the appointment delete action.

Thank you.

Rebecca
Top achievements
Rank 1
 answered on 06 May 2011
2 answers
140 views
I am implementing a DragAndDropBehavior class and have overwritten the Resize function; however I cannot figure out how to Resize the appointment without passing the state to the MyBase.Resize() method.

I have tried the following to resize the appointment, and the start&end properties of the underlying objects (the appointment) change but visual GUI representation for the appointment does not.

How do I resize the appointment's GUI representation?

Public Overrides Sub Resize(ByVal state As Telerik.Windows.Controls.DragDropState)

        Dim draggedAppointment As myCustomAppointment = Nothing
        If state.Appointment.GetType Is GetType(Occurrence) Then
            draggedAppointment = DirectCast(state.Appointment, Occurrence).Appointment
        ElseIf state.Appointment.GetType Is GetType(Appointment) Then
            draggedAppointment = DirectCast(state.Appointment, myCustomAppointment)
        End If

        If draggedAppointment IsNot Nothing Then
            Dim startTS As New TimeSpan(state.DestinationSlots(0).Start.DayOfWeek, state.DestinationSlots(0).Start.Hour, state.DestinationSlots(0).Start.Minute, state.DestinationSlots(0).Start.Second)
            Dim endTS As New TimeSpan(state.DestinationSlots(0).[End].DayOfWeek, state.DestinationSlots(0).[End].Hour, state.DestinationSlots(0).[End].Minute, state.DestinationSlots(0).[End].Second)

            If startTS <> draggedAppointment.TimePeriod.StartTime Then
                draggedAppointment.Start = state.DestinationSlots(0).Start
                state.DestinationSlots(0).Start = draggedAppointment.Start
            End If

            If endTS <> draggedAppointment.TimePeriod.EndTime Then
                draggedAppointment.End = state.DestinationSlots(0).End
                state.DestinationSlots(0).End = draggedAppointment.End
            End If
        End If

       'MyBase.Resize(state)
End Sub


Thank you for your time.
Rebecca
Top achievements
Rank 1
 answered on 06 May 2011
1 answer
194 views
Hi,

We have a problem with getting the SelectedItem of the RadTreeView
when we right clicking it to show it's ContextMenu.

the solutions that are presented in the posts are both written in the code behind
and involve an explicit casting to a RadTreeView / RadTreeViewItem in order to
get the SelectedItem.

We are looking for a solution where there is no need to use this code in the code-behind:
http://www.telerik.com/community/forums/wpf/treeview/right-click-to-select-item.aspx
as in Syncfusion there is a property: IsSelectOnRightMouseClick that does that.

We are also looking into avoiding mentioning 3rd-party controls in our ViewModel,
in our Syncfusion mockup we are able to produce this handler:

       void OurTree_MouseRightButtonDown(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
        {
            SelectedItem = e.NewValue as OurSpecificObject;
        }

is it possible to do this with telerik?

thank you.
Tina Stancheva
Telerik team
 answered on 06 May 2011
3 answers
438 views
Hi

I need to bind the images in combobox at load . I using MVVM Pattern for my development.
 
Can anyone suggest me what should I do.

Regards
Yana
Telerik team
 answered on 06 May 2011
1 answer
78 views
hey guys,

not sure if this belongs on this forum OR the RadRibbon forum, but its the RichTextBox that i'm most interested in, basically the problem we have, is i have a list of 0 - N controls we call these ActivityControls, each Activity has a TWO RichTextBox controls,

So I have a Ribbon control to control my list of controls, with a Contextual Tab for the Text and Table Controls (taken from the telerik demo)

Is it possible for this singular set of controls to control potentially hundreds of RichText Controls?

If you have a demo of this functionality that'd be brilliant!

Cheers
Regards
Kevin.

Iva Toteva
Telerik team
 answered on 06 May 2011
4 answers
409 views
When displaying "Name" from button collection, selected item is not displayed.
It looks pretty straight forward but I can't think of why it won't work.. hmm..
Is this a telerik bug?
The following code shows two different methods, "DataTemplate" and "DisplayMemberPath"
I appreciate for your help.
-chris


<Window x:Class="RadComboBoxExample.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid x:Name="grid">
        <Grid.Resources>
            <DataTemplate x:Key="comboTemplate">
                <TextBlock Text="{Binding Name}" />
            </DataTemplate>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
          
        <StackPanel Grid.Column="0" Orientation="Vertical">
            <TextBlock Text="Use ItemTemplate" Margin="10" FontSize="15" HorizontalAlignment="Center" />
            <telerik:RadComboBox x:Name="comboBox1" Width="100" Height="30"  
                                 ItemsSource="{Binding ButtonCollection1}" 
                                 SelectedItem="{Binding SelectedButton1}" 
                                 ItemTemplate="{StaticResource comboTemplate}"/>
        </StackPanel>
  
        <StackPanel Grid.Column="1" Orientation="Vertical">
            <TextBlock Text="Use DisplayMemberPath" Margin="10" FontSize="15" HorizontalAlignment="Center" />
            <telerik:RadComboBox x:Name="comboBox2" Width="100" Height="30" 
                                 Grid.Column="1"
                                 ItemsSource="{Binding ButtonCollection2}" 
                                 SelectedItem="{Binding SelectedButton2}" 
                                 DisplayMemberPath="Name"/>
        </StackPanel>
    </Grid>
</Window>

using System.Collections.ObjectModel;
using System.Windows;
using Telerik.Windows.Controls;
  
namespace RadComboBoxExample
{
    public partial class MainWindow : Window
    {
        public ObservableCollection<RadButton> ButtonCollection1 { get; set; }
        public ObservableCollection<RadButton> ButtonCollection2 { get; set; }
        public RadButton SelectedButton1 { get; set; }
        public RadButton SelectedButton2 { get; set; }
  
        public MainWindow()
        {
            InitializeComponent();
  
            ButtonCollection1 = new ObservableCollection<RadButton>();
            ButtonCollection2 = new ObservableCollection<RadButton>();
  
            for (int i = 0; i < 10; i++)
            {
                RadButton button1 = new RadButton();
                button1.Name = "Button1_Item" + i;
                ButtonCollection1.Add(button1);
  
                RadButton button2 = new RadButton();
                button2.Name = "Button2_Item" + i;
                ButtonCollection2.Add(button2);
            }
  
            grid.DataContext = this;
        }
    }
}

Chris
Top achievements
Rank 1
 answered on 06 May 2011
1 answer
62 views
How the heck does one get to owner Chart instance from ItemToolTipOpening event? And why on the earth didn't you use normal event definition - sender instead of tooltip - you could pass tooltip instance within ItemToolTipEventArgs ?
Ves
Telerik team
 answered on 06 May 2011
1 answer
107 views
I'm trying to get a skinny Carousel working, about 30-or-so pixels high. I tried wrapping RadCarouselPanel in a ListView, but found I had no easy way of accessing SelectedItems.

I'm back to mucking with a RadCarousel to house it all, but those buttons are driving me crazy. Is there an example of using the RadCarousel that does not have the four buttons (page up, moveby, etc)? The only examples I see without the buttons are simply not using the RadCarousel.

Any help would be greatly appreciated
Milan
Telerik team
 answered on 06 May 2011
1 answer
77 views
Hi,

I have been using 2 level Hierarchical RadGrid (ver 2010.2.0924) for my application. On running the automation tool (like UI Spy), tool does not able to detect the 2nd level of Grid. It only detects the first level of Grid. I have given the AutomationId for both the 1st level as well as for the 2nd level. Here is the xaml of the defined 2 level hierarchical grid.

 

 


<
telerik:RadGridView Name="EntitlementGrid" AutomationProperties.Name="EntitlementGrid"

 

 

IsReadOnly="True" ColumnWidth="*"

 

 

telerik:StyleManager.Theme="Windows7"

 

 

 

ItemsSource="{Binding EntitlementsVM.SelectedEntitlements}"

 

 

 

IsFilteringAllowed="{Binding EnableFilters}"

 

 

ScrollViewer.VerticalScrollBarVisibility="Visible" SelectionMode="Extended">

 

 

 

<telerik:RadGridView.ChildTableDefinitions>

 

 

 

<telerik:GridViewTableDefinition />

 

 

 

</telerik:RadGridView.ChildTableDefinitions>

 

 

 

<telerik:RadGridView.Columns>

 

 

 

<telerik:GridViewDataColumn MaxWidth="30" Header="" IsFilterable="False" >

 

 

 

<telerik:GridViewColumn.CellTemplate>

 

 

 

<DataTemplate>

 

 

 

<CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding IsChecked, Mode=TwoWay}"

 

 

ClipToBounds="True" Padding="1"/>

 

 

 

</DataTemplate>

 

 

 

</telerik:GridViewColumn.CellTemplate>

 

 

 

</telerik:GridViewDataColumn>

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Entitlement Id" UniqueName="EntitlementId" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="PO" UniqueName="PO" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="SO" UniqueName="SO" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Type" UniqueName="Type" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Total" UniqueName="TotalCount" ToolTip="Total Count" />

 

 

 

<telerik:GridViewDataColumn DataType="{x:Null}" Header="Available" UniqueName="AvailableCount" ToolTip="Available Count" />

 

 

 

<telerik:GridViewDataColumn IsFilterable="False" DataType="{x:Null}" Header="Requested" UniqueName="RequestedCount" ToolTip="Requested Count" />

 

 

 

<telerik:GridViewDataColumn IsFilterable="False" DataType="{x:Null}" Header="Remaining" UniqueName="RemainingCount" ToolTip="Remaining Count" />

 

 

 

</telerik:RadGridView.Columns>

 

 

 

<telerik:RadGridView.HierarchyChildTemplate>

 

 

 

<DataTemplate>

 

 

 

<telerik:RadGridView Name="EntitlementFeaturesGrid" AutomationProperties.Name="EntitlementFeaturesGrid"

 

 

IsReadOnly="True" RowIndicatorVisibility="Collapsed"

 

 

 

IsFilteringAllowed="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}, AncestorLevel=1}, Path=IsFilteringAllowed}"

 

 

ItemsSource="{Binding EntitlementItems}"

 

 

 

telerik:StyleManager.Theme="Windows7"

 

 

 

ColumnWidth="Auto">

 

 

 

<telerik:RadGridView.Columns>

 

 

 

<telerik:GridViewDataColumn Header="Feature Name" DataMemberBinding="{Binding ProductName}" />

 

 

 

<telerik:GridViewDataColumn Header="Feature Desc" DataMemberBinding="{Binding ProductDescription}" />

 

 

 

<telerik:GridViewDataColumn Header="Total" DataMemberBinding="{Binding Total}" />

 

 

 

<telerik:GridViewDataColumn Header="Available" DataMemberBinding="{Binding Available}" />

 

 

 

<telerik:GridViewDataColumn Header="Requested" DataMemberBinding="{Binding Requested}" />

 

 

 

<telerik:GridViewDataColumn Header="Remaining" DataMemberBinding="{Binding Remaining}" />

 

 

 

</telerik:RadGridView.Columns>

 

 

 

</telerik:RadGridView>

 

 

 

</DataTemplate>

 

 

 

</telerik:RadGridView.HierarchyChildTemplate>

 

 

 

</telerik:RadGridView>

 


Also, i downloaded the trial version of RadGrid (ver 2011.1.0419.35) but this too displays the same behavior. Is there some settings taht I am missing to get the 2nd level of gird detected in the automation tool ?

Appreciate response.

Mustansir.
Yordanka
Telerik team
 answered on 06 May 2011
1 answer
71 views

Hi,
I'm working with RadControls for WPF Q1 2010, released on 22 April 2010.
I have a Spline chart bound to a list of objects with a DateTime and an Int value. The Values are plotted correctly using LineSeries, however I ran into a problem using SplineSeries.

If there is no data point for a long time, the chart shows unexpected behavior at the ends of long period as highlighted in the attached illustration. This is unwanted as the X axis represents Time and as it is impossible for time to get back this misrepresents the data. It seems to be a bug from Telerik Chart in such conditions.

I'd like to find out if there is a setting or later release that prevent this behavior. I hope someone can tell me what is wrong!

SplineUnexpectedBehavior.png
Yavor
Telerik team
 answered on 06 May 2011
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?