Telerik Forums
UI for WPF Forum
2 answers
98 views
Hi.
I am using the following code:
    public partial class Window1 
    { 
        public Window1() 
        { 
            InitializeComponent(); 
            this.Foos = new ObservableCollection<Foo>(new[] 
                        { 
                            new Foo { Name = "1" }, 
                            new Foo { Name = "2" }, 
                        }); 
        } 
 
        private void Window_Loaded(object sender, RoutedEventArgs e) 
        { 
            this.DataContext = this
        } 
 
        public ObservableCollection<Foo> Foos{ getset;} 
    } 
 
    public class Foo : IDataErrorInfo 
    { 
        public string this[string columnName] 
        { 
            get 
            { 
                return "Error"
            } 
        } 
 
        public string Error 
        { 
            get 
            { 
                return "Error!"
            } 
        } 
 
        public string Name { getset; } 
    } 

in combination with this xaml:
<Window x:Class="WpfApplication6.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
    Title="Window1" Height="300" Width="300" 
        Loaded="Window_Loaded"
    <telerik:RadGridView ItemsSource="{Binding Path=Foos}" 
                         AutoGenerateColumns="False"
        <telerik:RadGridView.Columns> 
            <telerik:GridViewDataColumn Header="Name 1" 
                                        DataMemberBinding="{Binding Path=Name, ValidatesOnDataErrors=True}" /> 
            <telerik:GridViewColumn Header="Name 2"
                <telerik:GridViewColumn.CellTemplate> 
                    <DataTemplate> 
                        <TextBox Text="{Binding Path=Name, ValidatesOnDataErrors=True}" /> 
                    </DataTemplate> 
                </telerik:GridViewColumn.CellTemplate> 
            </telerik:GridViewColumn> 
        </telerik:RadGridView.Columns>         
    </telerik:RadGridView> 
</Window> 

The second TextBox "Name 2" does show the DataErrors fine. However the GridViewDataColumn ("Name 1") seems unaware of the DataErrorInfos.

Am I missing something or is the GridVioewDataColumn unaware of IDataErrorInfo ?

Nils
Nils
Top achievements
Rank 1
 answered on 05 Feb 2010
1 answer
84 views
Hello,
    I've added some code to my grid's double click event so if a cell is double clicked the column header's caption will be appended with (*). The problem I having occurs when I scroll to the right and than double click the column caption is not modified. If I scroll to right a couple of times and than scroll back to where I double clicked the (*) appears in the column caption.
I am almost certain this is caused by  Column Virtualization. Is their anyway to fix this so the (*) appears after I've double clicked?
Thanks
Vlad
Telerik team
 answered on 05 Feb 2010
9 answers
232 views
Hello, I just installed the demo. It seems to work fine when I click on an item on the tree list but when I click on another item on the tree list, it crashes. It always crashes when I select my second item but the first item loads fine.

Here's a screenshot: http://img291.imageshack.us/img291/7963/crashwi6.jpg
yagimay
Top achievements
Rank 1
 answered on 05 Feb 2010
2 answers
115 views
Hello
I'm binding a IList<BusinessObject> to the GridViewDataColumn through a converter.
Code snippet:

                          <telerik:GridViewDataColumn
                                                        Header="Classes"
                                                        Width="15*"
                                                        UniqueName="AuthorisationClasses"
                                                        DataMemberBinding="{Binding AuthorisationClasses, Converter={StaticResource AuthorisationClassesListConverter}}"

The view gets updated dynamically if I make the AuthorisationClasses an ObservableCollection. I was wondering if I could make the view update dynamically without making it an ObservableCollection. The reason being, AuthorisationClasses is a business entity and all the business entites in our solution are of type List<T>.
Thanks in advance

Regards
Binu
 
Binu Abraham
Top achievements
Rank 1
 answered on 05 Feb 2010
4 answers
87 views
Hello,
     I several checkbox columns on my grid and every once in a while a checkbox in one of the rows turns to the word True or False.
Usually when I scroll up or down it will change back to a checkbox but sometimes it won't and when I click on the checkbox that's changed the cell is protected. I have to close the app down. 
Jorge Gonzalez
Top achievements
Rank 1
 answered on 04 Feb 2010
2 answers
247 views
When the RadComboBox is in IsEditable mode, how do I set the MaxLength and CharacterCasing properties of the TextBox used for entering data?
Konstantina
Telerik team
 answered on 04 Feb 2010
10 answers
253 views
Hello,

The moment I try to edit the PaneHeader Style through Blend (Edit Style >create a copy), after putting the PaneHeader WPF component in a window.xaml, it returns "invalid xaml".. see screenshot.



I would like to make them blue, but have a hard time with the theming process.

would you have a custom colour theming of the Radpane working sample as described in the help documentation ?

Cheers
Konstantina
Telerik team
 answered on 04 Feb 2010
3 answers
96 views
Hi, Im using Prism + Wpf and trying to get the commanding to work on a button i have placed in the panel bar using a datatemplete. Here is a copy of the datatemplate:

<DataTemplate x:Key="RadPanelBarItemTemplate">
                <StackPanel Orientation="Vertical" Margin="1" HorizontalAlignment="Left">
                    <Button Width="140" Height="25" Margin="2"
                            Tag="{Binding Tag}"
                            Content="{Binding Title}"
                            ToolTip="{Binding Description}"
                            commands:Click.Command="{Binding NavigationBarClickCommand}"
                            commands:Click.CommandParameter="{Binding Tag}"/>
                </StackPanel>
            </DataTemplate>

Is this possible, at the moment my command is never getting fired. Or should I be using a different approach?

Thanks, Mark


Tihomir Petkov
Telerik team
 answered on 04 Feb 2010
3 answers
182 views
Hi,

i try to render WPF content with telerik chart-controls in VB6. This is possible if you are using the Microsoft Interop Forms Toolkit (http://msdn.microsoft.com/en-us/vbasic/bb419144.aspx). If i'm using the 2D controls everiting is fine. But if I switch to 3D I get a OutOfMemoryException or NullReferenceException.

Here is my XAML:
<UserControl x:Class="UserControl1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:charts="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting">  
    <Grid> 
        <charts:RadChart x:Name="MyChart"/>  
    </Grid> 
</UserControl> 
 

This is the code-behind from the 2D version:
    Public Sub New()  
 
        ' This call is required by the Windows Form Designer.  
        InitializeComponent()  
 
        ' Add any initialization after the InitializeComponent() call.  
        MyChart.DefaultSeriesDefinition = New BarSeriesDefinition  
 
        Dim itemSource As Double() = {5, 9, 17, 10, 11, 3, 12}  
        MyChart.ItemsSource = itemSource  
 
    End Sub 
 

And here is the code-behind from the 3D version:
    Public Sub New()  
 
        ' This call is required by the Windows Form Designer.  
        InitializeComponent()  
 
        ' Add any initialization after the InitializeComponent() call.  
        MyChart.DefaultSeriesDefinition = New Bar3DSeriesDefinition  
 
        Dim itemSource As Double() = {5, 9, 17, 10, 11, 3, 12}  
        MyChart.ItemsSource = itemSource  
 
        AddHandler MyChart.DefaultView.ChartArea.Loaded, AddressOf Me.RadChart_Loaded  
 
    End Sub 
 
    Private Sub RadChart_Loaded(ByVal sender As ObjectByVal e As RoutedEventArgs)  
 
        Dim camera As New CameraExtension  
        camera.SpinAxis = SpinAxis.XY  
        camera.ZoomEnabled = True 
 
        MyChart.DefaultView.ChartArea.Extensions.Add(camera)  
 
    End Sub 

The same code works in a normal .NET-project and also in a WinForms-project on the ElementHost.

Best regards,
Dimi
Dimi
Top achievements
Rank 1
 answered on 04 Feb 2010
3 answers
634 views
Good Morning,

I have been working with the WPF demo/code.  It uses 

Telerik.Windows.QuickStart.dll extensively and I cannot track what is being done.  It hides many aspects, such as page transfers and returns.  Is there a place where I can see what is going on?

Take Care,
Dave

Hristo
Telerik team
 answered on 04 Feb 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?