Telerik Forums
UI for WPF Forum
39 answers
477 views
Upgraded my VS 2008 WPF project (two, in fact) with the Q3 release today using the Upgrade Wizard. Now when I switch to the Design view of any page I get the following error:

Error   1   '/Telerik.Windows.Controls;component/Themes/GenericExpressionDark.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. '/Telerik.Windows.Controls;Component/themes/Expression/Dark/BusyIndicator.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Could not load type 'Microsoft.Windows.Design.Metadata.ProvideMetadataAttribute' from assembly 'Microsoft.Windows.Design.Extensibility, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Line '142' Position '39'.  Error at object 'System.Windows.ResourceDictionary' in markup file 'Telerik.Windows.Controls;component/Themes/GenericExpressionDark.xaml'.  Error at object 'System.Windows.ResourceDictionary'.   C:\Documents and Settings\akedzier\My Documents\Visual Studio 2008\Projects\DSD_MissionsBoards\DSD_MissionsBoards\Scenes\Scene_07.xaml   104   33   DSD_MissionsBoards


I'm not using GenericExpressionDark.xaml anywhere in my project, so I'm just a little confused.

(WinXP SP3, VS2008 SP1, WPF 3.5)
Julio Colon
Top achievements
Rank 1
 answered on 17 Mar 2011
3 answers
79 views
Hi there, 

I am using a RadGridView, here is the XAML

<telerik:RadGridView Grid.Row="1"
                            Grid.ColumnSpan="3"
                            SelectionMode="Single"
                            IsReadOnly="True"
                            Name="radGridView1"
                            ItemsSource="{Binding Path=ModelCodeList}"
                            SelectedItem="{Binding Path=SelectedModel, Mode=TwoWay}"
                            AutoGenerateColumns="False"  >
           <telerik:RadGridView.Columns>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Code}" Header="Model"/>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" Header="ID"/>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding OemName}" Header="OEM Name"/>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding ModalityCode}" Header="Modality Code"/>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Active}" Header="Model Active"/>
           </telerik:RadGridView.Columns>
       </telerik:RadGridView>

As you can see I am binding the selected item, I followed the example from the code download in this (http://www.telerik.com/community/forums/wpf/gridview/select-a-row-from-viewmodel.aspx) post. I works the first time no problem... I put a breakpoint in my view model and I can see my SelectedModel getting set. The problem is that I can't unselect the first item and have it set the second item. At this point I am stuck - here is the pertinent code from the view model.

public Model SelectedModel
   {
     get { return selectedModel; }
     set
     {
       if (selectedModel != value)
       {
         selectedModel = value;
       }
       RaisePropertyChanged(() => this.SelectedModel);
       AddSelectedModelCommand.RaiseCanExecuteChanged();
     }
   }


What is does is keeps highlighting rows - even though I have SelectionMode="sinlge" - Uhm? Any suggestions? I attached a screen capture to show what I mean - see all the highlighted rows?

Thanks!

** Also - The only difference I can see between my project and the sample is that we are "Target Framework:" is set to ".NET Framework 4" and your project is being built as ".NET Framework 4 Client Profile"
Milan
Telerik team
 answered on 17 Mar 2011
3 answers
169 views

Hello,

I'm currently evaluating the trial version of RadControls for WPF 2010_3_1314.

I have found solutions for my other problems with the RadDateTimePicker, but couldn't find anything on opening the calender to the current date for the WPF version.

In my window I have a RadDateTimePicker to select the birth-date of a person, bound to the entity selected from a SQL-database.

When a new person is added it has no birth-date, as this is not a mandatory field.

In everyday use the calendar will hardly be needed, as it is simpler just to type the birth-date instead of navigating there.

However it would still be nice to open the calendar to the current date instead of 1/1/1800, the minimum allowed date I have set.

How can I open the calendar to the current date, without it actually being selected?

Thanks

Yana
Telerik team
 answered on 17 Mar 2011
1 answer
266 views
This is my code:
<telerik:RadComboBox Height="30" HorizontalAlignment="Left" Margin="126,63,0,0" Name="RadComboBox1" VerticalAlignment="Top" Width="262">
            <telerik:RadComboBoxItem Content="Item 1" />
            <telerik:RadComboBoxItem Content="Item 2" Visibility="Collapsed"/>
            <telerik:RadComboBoxItem Content="Item 3" />
        </telerik:RadComboBox>
But Item 2 not collapse.

Thanks,
Yana
Telerik team
 answered on 17 Mar 2011
3 answers
195 views

I have a completely dynamic RadTreeView that users can add items to. To add a child item, the user selects an existing item and presses a button to generate a new item under the currently selected item. All of that works fine, but the parent item doesn't expand to show the newly added item. I'm trying to get this to happen so that the user doesn't have to manually expand the parent after adding a child.  

This project is using MVVM and the tree items are all databound to an ObservableCollection of a custom class located in my View-Model. The currently selected item is also databound to a property in my View-Model that is of the same custom class as the ObservableCollection. 

Since I'm adding the new items to my tree through the databound property in the View-Model, I can't simply tell the parent to expand from there because it has no access to the UI elements. Immediately after I create the new item I set it in the View-Model as the currently selected item. I figure this will trigger the SelectionChanged event on the RadTreeView (which it does)  so my idea is to try and expand the parent of the currently selected item from there. 

The problem there is that I can't get anything working properly in the SelectionChanged event.

The "SelectionChangedEventArgs" Source property only gives me an object of the custom class type. Obviously that doesn't allow me to change the IsExpanded property. Whenever I try to cast the Source property as a RadTreeViewItem it always returns null. Similarly I have also tried iterating through the RadTreeView itself, but that does the same thing. I can easily get the object of the custom class from the View-Model, but nothing I try gives me the RadTreeViewItem for me to expand. 

I've messed around with the GetItemByPath and ExpandItemByPath methods, but it is completely possible for items in my tree to have the exact same name. In that case, how would those methods know which path is the right path? I don't think those will work for me.

I have also tried the code here, specifically this:

private void radTreeView_SelectionChanged( object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e )
{
   // Get a reference to the treeview
   Telerik.Windows.Controls.RadTreeView treeView = sender as Telerik.Windows.Controls.RadTreeView;
   // Get the currently selected items
   ObservableCollection<Object> selectedItems = treeView.SelectedItems;
   RadTreeViewItem item = selectedItems[ 0 ] as RadTreeViewItem;
}

However, as I mentioned before, "item" is always coming out null. If I instead cast it to my custom class, item holds the correct data and I can get the parent item, but is not a RadTreeViewItem for me to expand.

Thanks in advance for any help...

Petar Mladenov
Telerik team
 answered on 17 Mar 2011
1 answer
75 views
Hi,

We're just implementing Telerik controls in our WPF (PRISM) application and having some problems with the DataFilter control.
We have a radgrid and can bind the control to the grid and filter without any problems. However, the requirement is display 3 filterable fields when the screen loads and for only 3 fields out of a possible 8 of the grid view.

So we're trying to go down the FilterDescriptions route and define our 3 filters programatically

                var companyFilter = new FilterDescriptor("Receiver Company", FilterOperator.Contains, "", true);
            radDataFilter.FilterDescriptors.Add(companyFilter);
 
            var addressFilter = new FilterDescriptor("Address Line 1", FilterOperator.Contains, "", true);
            radDataFilter.FilterDescriptors.Add(addressFilter);
 
            //// DateTime filter.
            var dateFilter = new FilterDescriptor("Created Date", FilterOperator.IsGreaterThan,
                                                 new DateTime(2007, 5, 1));
            radDataFilter.FilterDescriptors.Add(dateFilter);

However when we do this it throws an error saying the source isn't IEnumerable. The source in this instance is defined in the XAML as the radgrid, which has loaded an IList<Receiver> object, which last time I checked was IEnumerable.

Even if I set the Datasource programatically to a List<Receiver> still get the same error.

I'm not sure where to turn and thinking maybe Data annotations are an option.

Any views?

Thanks.


Rossen Hristov
Telerik team
 answered on 17 Mar 2011
3 answers
338 views
Hello Telerik Team,
                             I have one clarification in my latest WPF project.Here I am  having one radcombo box.Its contains 3 values.
<telerik:RadComboBox HorizontalAlignment="Left" SelectedIndex="{Binding xx}"  Margin="114,207,0,0" Name="radComboBox2" VerticalAlignment="Top" Width="205">
            <telerik:RadComboBoxItem Content="Item 1" />
            <telerik:RadComboBoxItem Content="Item 2" />
            <telerik:RadComboBoxItem Content="Item 3" />
        </telerik:RadComboBox>
When window loading time i want to display item3 in radcombobox.After window loading client can change the value and storing into database.
So i am binding into selectedindex in XAML.
codebehind sample
public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            this.radComboBox2.SelectedIndex = 2;
        }
    }
 But it display empty Combobox?
why?
pls give me any suggestions
Konstantina
Telerik team
 answered on 17 Mar 2011
2 answers
66 views
When entering a date in the RadDatePicker, where the century is not specified (e.g. 6/20/76), is there a way to instruct the parser to deliver 1976 instead of 2076, short of reimplementing it?
Even if SelectableDateEnd and DisplayDateEnd are set to DateTime.Now, the parser still selects the future date.

Alternatively, is there a way to call your builtin parser (which works like a charm except for this small issue) from a custom Parse... event handler in order to tweak its result a bit?

Thanks
Phil
Philip
Top achievements
Rank 1
 answered on 17 Mar 2011
19 answers
173 views
Hi!

I'm currently using the GridView component. But I see that the text above(Drag a column header and drop it here to group by that column) doesn't seems to change depending of the current localisation.

I've to do a fully multilanguage interface, how can I change this text?

Thank you :)
Maya
Telerik team
 answered on 17 Mar 2011
2 answers
274 views
Hello,

I have a RadGridView control with flow direction set from right to left.
Inside the grid I have a MaskedTextBoxColumn that is used to display and edit a DateTime object.

I want to have only this column with flow direction from left to right so the date is displayed to the left of the time.
I don't see FlowDirection Property on this column or on any other column.
If I'm setting the FrameworkElement.FlowDirection property it is being ignored.

Is it possible?

Thanks,
Evgeny
Evgeny
Top achievements
Rank 1
 answered on 17 Mar 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?