Telerik Forums
UI for WPF Forum
1 answer
116 views
I am attempting to use an ItemTemplateSelectorselector with the RadPaneGroup control.


   <telerik:RadPaneGroup x:Name="RadPaneGroupMain" ItemsSource="{Binding OpenDocuments}" ItemTemplateSelector="        {StaticResource OpenDocumentTemplateSelector}">
</telerik:RadPaneGroup>

The ItemTemplateSelector is defined as a static resource on the window. It is getting instantiated (tested via breakpoint in constructor) but the DataTemplateSelector.SelectTemplate method is never called. Code for the DataTemplateSelector is below.

internal class ModuleNodeEntityDataTemplateSelector : DataTemplateSelector
{
    public const string NoModuleEntityEditorTemplateKey = "NoModuleEntityEditorTemplate";
 
    public override DataTemplate SelectTemplate(object item, DependencyObject container)
    {
        var containerTyped = (RadPaneGroup)container;
        return (DataTemplate) containerTyped.Resources[NoModuleEntityEditorTemplateKey];
    }
}

Kalin
Telerik team
 answered on 13 Feb 2015
3 answers
299 views
Hi,

We have the requirement to use multi select combobox as the column in RadGridview and also have detail section below should have the multi select combobox which can be bindable with selected item property (collection). It is going to be twoway bindable.

Selecting the detail section dropdown should reflect the RadGridview selected row column and vise versa.

Please have a look on the attached image which holds the explanation of the same. It will be appreciated, if you can provide the solution with example.

Thanks,
Arnaud
Top achievements
Rank 1
 answered on 13 Feb 2015
2 answers
113 views
I've got a RadCartesianChart with an Linear X and Y axis.  The Y axis goes from 0 to 11  I'm trying to change the background of the plot area only between 10 and 11 (Showing a Warning Area).  Anyone have a good idea how to do this?

Tom
Tom
Top achievements
Rank 1
 answered on 12 Feb 2015
1 answer
38 views
How can I enable user selection of one or more columns in RadGridView?
Heiko
Top achievements
Rank 1
 answered on 12 Feb 2015
5 answers
251 views
Hello,

I use ExpandoObject in RichTextbox for get and set mergefields dynamicly, but i have problem with tables. When i use merge fields in tables i can not give any inline. How can i use dynamic merge fields with table.

Thanx.
Tanya
Telerik team
 answered on 12 Feb 2015
3 answers
296 views
Team,

What property is available on a RadSpreadsheet to find if the workbook/activeWorkSheet is empty ?

Currently Im using the below code to find the same.
var stream = new MemoryStream();
new XlsxFormatProvider().Export(radSpreadsheet.Workbook, stream);
if (stream.Length == 3309) 
{
 //Empty Workbook
}
Tanya
Telerik team
 answered on 12 Feb 2015
0 answers
165 views
I'm trying to figure out why I'm experiencing a mismatch between the displayed and selected value in a RadComboBox.

The below code is a shot at a minimal working example.

If I place the cursor in the RadComboBox (dropdown closed) and press the down key a few times (quickly) the RadComboBox and TextBlock will show different values. From the looks of it the TextBlock is showing the correct value while the RadComboBox is not updating correctly.

Why is this and how can I solve it?

MainWindow.xaml
<Window x:Class="RadComboBox1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <StackPanel>
            <TextBlock Name="MyTextBlock" Text="{Binding SelectedItem.Name}"/>
            <telerik:RadComboBox
                Name="MyRadComboBox"
                ItemsSource="{Binding Items}"
                SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                IsEditable="True"
                DisplayMemberPath="Name"
                CanAutocompleteSelectItems="False"
                OpenDropDownOnFocus="True"
                TextSearchMode="Contains"
                IsFilteringEnabled="True">
            </telerik:RadComboBox>
        </StackPanel>
    </Grid>
</Window>

MainWindow.xaml.cs
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Threading;
 
namespace RadComboBox1
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            var dataContext = new RadComboBoxDataContext();
            MyRadComboBox.DataContext = dataContext;
            MyTextBlock.DataContext = dataContext;
        }
    }
 
    public class RadComboBoxItem
    {
        public string Name { get; set; }
    }
 
    public class RadComboBoxDataContext : INotifyPropertyChanged
    {
        public ObservableCollection<RadComboBoxItem> Items { get; set; }
 
        private RadComboBoxItem _selectedItem;
        public RadComboBoxItem SelectedItem
        {
            get
            {
                var value = _selectedItem;
                System.Diagnostics.Debug.WriteLine("GET=" + (value != null  ? value.Name : "<null>"));
                return value;
            }
            set
            {
                System.Diagnostics.Debug.WriteLine("SET=" + (value != null ? value.Name : "<null>"));
                _nextSelectedItem = value;
                _timer.Stop();
                _timer.Start();
            }
        }
 
        private RadComboBoxItem _nextSelectedItem;
        private DispatcherTimer _timer;
 
        public RadComboBoxDataContext()
        {
            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromMilliseconds(1000);
            _timer.Tick += OnTick;
 
            Items = new ObservableCollection<RadComboBoxItem>();
            for (var i = 0; i < 10; i++)
            {
                Items.Add(new RadComboBoxItem { Name = "Item" + i});
            }
 
            SelectedItem = Items[0];
        }
 
        private void OnTick(object sender, EventArgs args)
        {
            _timer.Stop();
            _selectedItem = _nextSelectedItem;
            OnPropertyChanged("SelectedItem");
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
 
        protected virtual void OnPropertyChanged(string propertyName = null)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
Linus
Top achievements
Rank 1
 asked on 12 Feb 2015
1 answer
281 views
I have telerik radgrid with many records. when applying a filter on columns it take some time to load the records. Here i  want to show a busy indicator or similar process while applying the filter. I tried setting radgrid busy property to true in "Filtering" event and setting it to false in "Filtered" event. But it doesn't seems working.

Ex:
    private void Grid_Filtering(object sender, GridViewFilteringEventArgs e)
   {
            grid.IsBusy = true;
    }
 
    private void Grid_Filtered(object sender, GridViewFilteredEventArgs e)
   {
            grid.IsBusy = false;
   }

Any help would be appreciated. Thanks in advance.
Dimitrina
Telerik team
 answered on 12 Feb 2015
2 answers
76 views
I have a QueryableDataServiceCollectionView that contains hierarchical data: Contracts and Contract Amounts.

I would like to bind the QueryableDataServiceCollectionView to separate RadGridViews (one for contracts, and one for the contract amounts base on the selected contract).

I have successfully done the above in a single RadGridView  using the HierarchyChildTemplate, but would prefer to separate the above into separate grids.

Is this possible?

Any assistance on this is Much Appreciated.

-MikeF





Michael
Top achievements
Rank 1
 answered on 12 Feb 2015
1 answer
110 views
Wasn't sure how to report this, so I will post it in the forums.

Your Demos for Expression Editor in WPF are broken on both the installed version and the source.

Reproduce In Source Demos:

1. Explore All Controls
2. Click Expression Editor
3. Boom Blows up on line 223 of the SingleExampleViewModel.cs file (In the downloable Demos) -- 
4. File Not Found Exception
5. An exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not load file or assembly 'ExpressionEditor, Culture=neutral' or one of its dependencies. The system cannot find the file specified.

Reproduce in installed Demos:
1. Explore All Controls
2. Expression Editor
3. More Choices (Either of the RadGrid Integration).
4. Attached Screenshot.


Works on the Silverlight online examples, but there is only one option, and I was looking at the other.

Regards,

Bart



Dimitrina
Telerik team
 answered on 12 Feb 2015
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?