Telerik Forums
UI for WPF Forum
3 answers
723 views
Hi,

Im using radgridview in a user control and on trying to add the usercontrol at runtime to the main window leads to the following error .
Please let me know the reason for getting the error in the radgridview declaration statement in xaml.


EXCEPTION

'Set connectionId threw an exception.' Line number '63' and line position '22'.

INNER EXCEPTION

{"[A]Telerik.Windows.Controls.RadGridView cannot be cast to [B]Telerik.Windows.Controls.RadGridView. Type A originates from 'Telerik.Windows.Controls.GridView, Version=2010.2.714.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadFrom' at location 'C:\\....\\Telerik.Windows.Controls.GridView.dll'. Type B originates from 'Telerik.Windows.Controls.GridView, Version=2010.2.714.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'Default' at location 'C:\\....\\Telerik.Windows.Controls.GridView.dll'."}
Hristo
Telerik team
 answered on 19 Oct 2010
1 answer
114 views
Hi,

I use RadTreeView to display the content in a hierarchical structure. An item in the tree is dragged onto another control which is working. The thing which I want to disable is altering the structure of the tree by dragging the items within the tree. How can I do this?

The tree items are bound to a collection & use ItemTemplate to display the items.

Thank you.
Hristo
Telerik team
 answered on 19 Oct 2010
1 answer
60 views
Hello,

Can you provide me with guidance how to create Grid just like Ms Access.
Insert row is always visible on the top of the grid and once user leaves a row in insert mode new insert row is created.

I am using MVVM

thanks
Pavel Pavlov
Telerik team
 answered on 19 Oct 2010
1 answer
1.0K+ views
Hi,

I am using RadTreeView to show a Level Hierarchy. I have a textbox to enter search string and a "Search" button on the screen. When user enters the string and clicks "Search" button, the observable collection should be filtered and the Level that contains the entered string should be shown with their upper hierarchy only upto root.

I have made a class "Level" which I am using to implement Level hierarchy.

Here is the code for class

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Collections.ObjectModel;

 

namespace RadTreeViewSample

{

    class Level

    {

        public Level(int id, string name, Level parentLevel)

        {

            this.ID = id;

            this.Name = name;

            this.ParentLevel = parentLevel;

        }

 

        public int ID { get; set; }

        public string Name { get; set; }

        public Level ParentLevel { get; set; }

        public ObservableCollection<Level> ChildLevels { get; set; }

 

        public static ObservableCollection<Level> SampleLevelList(int level, Level parentOrg)

        {

            ObservableCollection<Level> orgList = new ObservableCollection<Level>();

            for (int i = 0; i < 5; i++)

            {

                Level org = new Level(i, "Level " + level.ToString() + "-" + i.ToString(), parentOrg);

                if (level > 0)

                    org.ChildLevels = SampleLevelList(level - 1, org);

                orgList.Add(org);

            }

            return orgList;

        }

    }

 

}

 

 

 

 






Here is the xaml

<
Window x:Class="RadTreeViewSample.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"

        xmlns:telerikTV="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

        Title="MainWindow" Height="350" Width="525">

    <Window.Resources>

        <HierarchicalDataTemplate x:Key="items" ItemsSource="{Binding ChildLevels}">

            <TextBlock Text="{Binding Name}"/>

        </HierarchicalDataTemplate>

    </Window.Resources>

    <Grid>

        <Grid.RowDefinitions>

            <RowDefinition Height="auto"/>

            <RowDefinition />

        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>

            <ColumnDefinition />

            <ColumnDefinition Width="auto"/>

        </Grid.ColumnDefinitions>

        <TextBox x:Name="txtOrgname" Grid.Row="0" Grid.Column="0" Margin="5" />

        <Button x:Name="btnSearch" Content="Search" Width="80" Grid.Row="0" Grid.Column="1" Margin="5" Click="btnSearch_Click"/>

        <telerik:RadTreeView x:Name="rtvLevel" ItemTemplate="{StaticResource items}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="5"/>

    </Grid>

</Window>

 

 

 



Here is my code-behind

 


using
System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Data;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Imaging;

using System.Windows.Navigation;

using System.Windows.Shapes;

using System.Collections.ObjectModel;

 

namespace RadTreeViewSample

{

    /// <summary>

    /// Interaction logic for MainWindow.xaml

    /// </summary>

    public partial class MainWindow : Window

    {

        private ObservableCollection<Level> LevelList;

        public MainWindow()

        {

            InitializeComponent();

 

            ObservableCollection<Level> LevelList = Level.SampleLevelList(5, null);

            rtvLevel.ItemsSource = LevelList;

        }

 

        private void btnSearch_Click(object sender, RoutedEventArgs e)

        {

What should I write here to filter the LevelList, so that only element that contains search string are show

       in treeview with their upper hierarchy only upto root ?

        }

 

    }

}

 

 

 

 

Kiril Stanoev
Telerik team
 answered on 19 Oct 2010
3 answers
434 views
Hi, Is it possible to modify the content of the tooltip?
When hovering a chart bar, we would like to handle the OnTooltipOpening Event and insert an ItemsControl or other (grid, ListBox...) to show details of the data.

So far, I have been able to get the datapoint (related data) but the child element of the tooltip is not showing.

Is there a TooltipTemplate somewhere and I haven't seen it? Or is it called something else?
It would be better to define this template in XAML and the databinding/context on the TooltipOpening event for me.

Any suggestion?

Thanks
Vladimir Milev
Telerik team
 answered on 19 Oct 2010
3 answers
93 views

Hi,
What is  the maximum limit for ItemsPerPage. How do Carousel handles the view if there is more than 100 image items assigned to ItemsPerPage.

Regards,
Raj.
Maya
Telerik team
 answered on 19 Oct 2010
1 answer
61 views
Hi,

I have a use case whereby I want to fix the first two columns in the RadGridView and make the rest scrollable.
What is the best possible way to achieve this?

Thanks,
Farhan
Maya
Telerik team
 answered on 19 Oct 2010
2 answers
126 views
I am trying to implement the SelectionChanged event on the RadGridView. In that event, I want to collapse every row in the GridView except that one row that happens to be selected. However, I can't seem to figure out how to find the rows themselves to set the IsExpanded property to true or false. The items collection is available, but it only gives me access to the bound collection and not the GridViewRow items. How do I get the rows collection?
Ristogod
Top achievements
Rank 2
 answered on 18 Oct 2010
6 answers
133 views
I'd like to set my columns to Auto for size, however I do not want to allow scrolling of any kind, nor should the column on the right dissapear off the right hand side.  I was hoping this property was a cumulative for all columns but it appears it's for each column.  Is there any way to make the columns size automatically but truncate data to fit in the screen they are given?
Paul
Top achievements
Rank 1
 answered on 18 Oct 2010
1 answer
110 views
I'm having an issue with the RadDatePicker which sounds very much like this topic


Do I need a converter of some type ?

I replaced the radDatePicker with a DatePicker and everything worked as expected, I'm thinking that there is somekind of bug or I need a converter.
Kaloyan
Telerik team
 answered on 18 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?