Telerik Forums
UI for WPF Forum
5 answers
279 views

Hi guys,

I have this XAML

<telerik:RadTreeListView AutoGenerateColumns="False" ItemsSource="{Binding Categories}" SelectedItem="{Binding SelectedCategory,Mode=TwoWay}">
   <telerik:RadContextMenu.ContextMenu>
     <telerik:RadContextMenu x:Name="CategoryContextMenu" Opened="CategoryContextMenu_Opened">
       <telerik:RadMenuItem Header="Aggiungi" />
     </telerik:RadContextMenu>
   </telerik:RadContextMenu.ContextMenu>
   <telerik:RadTreeListView.ChildTableDefinitions>
     <telerik:TreeListViewTableDefinition ItemsSource="{Binding Categories}" />
   </telerik:RadTreeListView.ChildTableDefinitions>
   <telerik:RadTreeListView.Columns>
     <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Categoria" />
     <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding Positive}" Header="Positivo" />
   </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

 Now, if I click on anything node, enter in CategoryContextMenu_Opened but GetClickedElement return null ever!

private void CategoryContextMenu_Opened(object sender, RoutedEventArgs e)
{
   RadTreeViewItem item = this.CategoryContextMenu.GetClickedElement<RadTreeViewItem>();
   if (item != null) //It never true!!!
   {
     viewModel.SelectedCategory = (LocalCategory)item.DataContext; //Can I do it?
    }
}

Dario
Top achievements
Rank 2
 answered on 05 Jun 2015
4 answers
68 views

Hello,

I need to achieve the following effect with RadChartView: both horizontal and vertical axis are numeric, I need to plot multiple rectangular regions on this Cartesian plane. See attached figure for an example.

Is there a way to achieve this with RadChartView? I know that none of the series by default do this. Is it possible to write my own custom series?

Vinod
Top achievements
Rank 1
 answered on 05 Jun 2015
2 answers
173 views

Hi,

I would like to create a Grid using Hierarchy programmatically

 

radGridView.ChildTableDefinitions.Add(new GridViewTableDefinition());
var g = new FrameworkElementFactory(typeof(TextBlock));
g.SetValue(TextBlock.TextProperty, "TEST");
DataTemplate dt = new DataTemplate();
dt.VisualTree = g;
radGridView.HierarchyChildTemplate = dt;

I can developp/reduce hierarchy but nothing in details. I did the same into xaml code with success.

How to code correctly datatemplate ?

Thanks 

Regards

Eric

 

Eric
Top achievements
Rank 1
 answered on 05 Jun 2015
1 answer
201 views

Hi

On your WPF demo, when a menuitem that has child menuitems is clicked (not using it's header, just on the name/icon), the child items are shown.

This saves this user having to click on the outer circle header which is handy.

How's this done, I can't get this to happen?

I've made the parent menuitem CanUserSelect="True", do I need to wire up some code also??

 

Thanks in advance.

Georgi
Telerik team
 answered on 05 Jun 2015
3 answers
198 views
I was pointed to the virtualised wrappanel by another developer but i've not managed to figure out if what I need is possible.

I want to have a wrappanel containing custom objects eg:

public class CO
{
    public int GroupA {get; set;}
   
    ... other properties not needed for this example
}

I've also got a group object like:

public class Group
{
    public int ID {get; set}
    public string Description {get; set}
}

I'm wanting a wrappanel where I can show the CO's. That's easy, WPF does this already.

What i'm wanting to do is trigger a "group by" so if I set to say A, then the wrappanel shows

GROUP 1 DESCRIPTION
   all CO's with GroupA = 1

GROUP 2 DESCRIPTION
  all CO's with GroupA = 2

This can be toggled on/off.

A further complication is where I may have different groups to group by eg: another GroupB member or, have a List<int> GroupMember and group if the desired ID is found in the list.

I have found a control by a telerik competitor which does do what i'm asking, but the price is over 10x Telerik and definately out of my price point.

Can this be done in the telerik suite ?

Ivan Ivanov
Telerik team
 answered on 05 Jun 2015
2 answers
131 views

Hi,
We are using Telerik RadDocking control within our main framework window. The RadDocking contains RadSplitContainers that has a RadPaneGroup with RadDoumentPane and RadDoumentPane.content 

Description: 
The content (RadDoumentPane.content) is WPF user control for to Displaying Data.
The data we display is rendered by some graphic component, using DirectX to render images on the Rad panel control.

This graphic component is writen in native C++/MFC, and is informed of the hosting WPF application window through its handle, in addition to the location of the Rad panel control. When given the order, this component is creating a window, to which it renders all its content,
placing that window exactly on the same location that we give (the location of the Dock panel). 

Issue:
The problem starts when we're undock the panel. We then have to inform the graphic component on the change
of host to the native window (when docked, the host is actually the main application window, but when undocked, it is rather the Docking panel itself). It seems that when we do that, we do get the native window to be hosted on the Dock panel (we see menus that belong to the native window, but no image is rendered on the native window.

*when the control is docked all works fine.

I think maybe it is a related issue
http://www.telerik.com/forums/wpf-frame-control-not-visible-in-floating-window

shay
Top achievements
Rank 1
 answered on 04 Jun 2015
1 answer
127 views

Hi, I have a problem probably with binding - when I try load something from database - everything works fine, but when I try save something to database - property is null

Detail.PoznamkaMax is ViewModel property - data from database

<telerik:RtfDataProvider x:Name="rtfDataProvider"
           Rtf="{Binding ElementName=poznamka, Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
          RichTextBox="{Binding ElementName=editor}"
                                 />
<risCtrl:RadTextInput x:Name="poznamka" Margin="0 100 0 0" Text="{Binding Path=Detail.PoznamkaMax,Mode=TwoWay,
                                            ValidatesOnExceptions=False, NotifyOnValidationError=True}" />
             
            <telerik:RadRichTextBox x:Name="editor" Grid.Row="1" Grid.Column="0"
                                    DocumentContentChanged="editor_DocumentContentChanged"
                                    Margin="0 4 0 0"
                />

Tanya
Telerik team
 answered on 04 Jun 2015
1 answer
78 views

Hi all, 

I am facing few issues in command  OpenContextMenuOnNextSpellingErrorCommand. I use this command to find the next word that is spelled wrongly in the document. It works fine as long as the words in the document doesnt contain special characters and keeps finding the next error word in the document. But once if it finds the words contain the special character like (RevPAR), Luto'n or Test$word, it stops finding for the next word in the document and gets stuck.

Is there any way I can fix this please ? We are using telerik version 2014.3.1021.40.

Thanks

A

 

Svetoslav
Telerik team
 answered on 04 Jun 2015
3 answers
644 views
This works with the standard ListBox:
<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
         
        <Grid.Resources>
            <Style  TargetType="{x:Type ListBoxItem}">
                <Style.Triggers>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                        <Setter Property="Background" Value="LightYellow"></Setter>
                    </Trigger>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                        <Setter Property="Background" Value="LightBlue"></Setter>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Grid.Resources>
         
         
        <ListBox ItemsSource="{Binding Path=Items}"
                      AlternationCount="2"/>
         
    </Grid>
</Window>


This does not work with the RadListBox:
<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
         
        <Grid.Resources>
            <Style  TargetType="{x:Type t:RadListBoxItem}">
                <Style.Triggers>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                        <Setter Property="Background" Value="LightYellow"></Setter>
                    </Trigger>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                        <Setter Property="Background" Value="LightBlue"></Setter>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Grid.Resources>
         
         
        <t:RadListBox ItemsSource="{Binding Path=Items}"
                      AlternationCount="2"/>
         
    </Grid>
</Window>


Any ideas?
Geri
Telerik team
 answered on 04 Jun 2015
3 answers
165 views
I'm using Telerik's wpf gantt control and I'm trying to find a way to get dependant task from a specific one.

For example, given Task 2, I need to get a sort of task2.dependant which should be a list or an array with Task 3, Task 4, Task 5, etc.

(see attached screenshot)

but task's dependencies have only a .FromTask property, which in Task 2 case is Task 1

public interface IDependency
{
    // Summary:
    //     Represents the destination task of relation.
    IGanttTask FromTask { get; set; }
    //
    // Summary:
    //     Represents the type of relation between two tasks, such as finish to start,
    //     start to finish, start to start, and finish to finish.
    DependencyType Type { get; set; }
}

Is there an easy way than looping through ALL tasks to find the one
which depend from Task 2 and then looping for that one and so on?
Vladi
Telerik team
 answered on 04 Jun 2015
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?