Telerik Forums
UI for WPF Forum
4 answers
117 views
Hi Guys,

I don't know whether this is GridView or RadTreeListView bug, but when you double click too fast to expand/collapse any row, you get null reference exception. The exception is thrown in GridViewRow.cs line 571: this.GridViewDataControl.RaiseRowActivated(this,this); where GridViewDataControl is being null.

Also I have the same problem when doing another thing. I subscribe for the row or cell (doesn't matter) double click event and in that event I try to change the IsExpanded property to it's opposite value. When I try to do that, I get the same NullReferenceException regarding the GridViewDataControl property.

I notice that you sometimes check for null value when accessing this property and sometimes you don't. Please advise. I would really want to be able to expand/collapse the row on double click event, but at this time I can't because of this internal exception.

I can provide you with sample code if you like, but I think the issues are very easy to spot.

Kind Regards,

Ivan.
Ivan Zlatanov
Top achievements
Rank 1
 answered on 18 Nov 2011
7 answers
398 views
Hello I have a prism/mvvm style application and am using the RadMenu control. I also have a view/view model pair in one project and another view/view model pair for my RadMenu control in another project. Basically I would like to use the event aggregator to send an event to the view model for the RadMenu (the view model that is paired with the view that the RadMenu sits inside of). So that the RadMenu's view model can notify the RadMenu to switch to a different RadMenuItem programmatically. I think I can use a blend behavior to contain the behavior I'm looking to reproduce, but I cannot find a method in the RadMenu that will allow me to programmatically select a specific menu item.

If the control does not support this now, is there a work around? Thanks.
Konstantina
Telerik team
 answered on 18 Nov 2011
1 answer
123 views
Hello,

I use the following code, I created a pie chart that appears with label displayed in spider mode (SpiderModeEnabled = true). However, did not displayed label of "Foo". (image1.jpg)

MainWindow.xaml
<Window x:Class="Test.MainWindow"
        Title="MainWindow"
        Height="250"
        Width="495"
        xmlns:TelerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
        xmlns:TelerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting">
    <Grid>
        <TelerikChart:RadChart x:Name="m_RadChart" />
    </Grid>
</Window>

MainWindow.xaml.cs
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 Telerik.Windows.Controls.Charting;
using Telerik.Windows.Controls;
 
namespace Test
{
 
    // Data model.
    public class ChartRecord
    {
        public string Legend { get; set; }
 
        public int Value { get; set; }
    }
 
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            // Create data source.
            List<ChartRecord> source = new List<ChartRecord>();
            source.Add(new ChartRecord() { Legend = "Foo", Value = 50 });
            source.Add(new ChartRecord() { Legend = "Bar", Value = 30 });
            source.Add(new ChartRecord() { Legend = "Baz", Value = 20 });
            m_RadChart.ItemsSource = source;
 
            m_RadChart.DefaultView.ChartArea.SmartLabelsEnabled = true;
 
            PieSeriesDefinition definition = new PieSeriesDefinition();
 
            // Setup label settings.
            RadialLabelSettings labelSettings = new RadialLabelSettings();
            labelSettings.SpiderModeEnabled = true;
            labelSettings.ShowConnectors = true;
            definition.LabelSettings = labelSettings;
             
            // Setup mappings.
            SeriesMapping seriesMapping = new SeriesMapping();
            seriesMapping.SeriesDefinition = definition;
            seriesMapping.ItemMappings.Add(new ItemMapping("Value", DataPointMember.YValue));
            seriesMapping.ItemMappings.Add(new ItemMapping("Legend", DataPointMember.XCategory));
            m_RadChart.SeriesMappings.Add(seriesMapping);
        }
    }
}

In addition, connecter disappeared when after making resize to small window until a pie chart disappears, restore to the original size.  (image2.jpg)

Do you have problem solution?

Thanks,
Nikolay
Telerik team
 answered on 18 Nov 2011
7 answers
364 views
Hi

I have a little application, than this:
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

I make the acquaintance of the Drag and Drop now, and I would like to ask it, that theoretically possible the Drag and Drop between two different View, or i can use it only one View than in these examples:

http://www.telerik.com/help/wpf/raddraganddrop-between-treeview-gridview.html


Thanks.
Tuan
Top achievements
Rank 1
 answered on 18 Nov 2011
13 answers
653 views
Hi,

I've a column which is a RadGridViewComboBox. Before it was only a normal text column and I was able to filter /sort on it, but now since it has to be editable, I had to replace this by a RadGridViewComboBox, but now the little funnel isn't displayed anymore.

Why this?

Here is how I made it:
<telerik:GridViewComboBoxColumn Header="Product"  Width="2*"  DataMemberBinding="{Binding Product}"  DisplayMemberPath="FullDescription" ItemsSource="{Binding Products}"/>


Thank you!
Pankaj
Top achievements
Rank 1
 answered on 18 Nov 2011
0 answers
124 views
Hi,

I want to handle the sorting state 'None' so as to sort the records in ascending order of first column. I have added following code to implement this
private void playersGrid_Sorting(object sender, GridViewSortingEventArgs e)
      {
          if (e.NewSortingState == SortingState.None)
          {
              this.playersGrid.SortDescriptors.Clear();
              SortDescriptor descriptor = new SortDescriptor();
              descriptor.Member = "Name";
              descriptor.SortDirection = System.ComponentModel.ListSortDirection.Ascending;
              //ColumnSortDescriptor csd = new ColumnSortDescriptor();
              //Telerik.Windows.Controls.GridView.ColumnSortDescriptor csd = new Telerik.Windows.Controls.GridView.ColumnSortDescriptor();
              //csd.Column = this.playersGrid.Columns[0];
              //csd.SortDirection = System.ComponentModel.ListSortDirection.Ascending;
              this.playersGrid.SortDescriptors.Add(descriptor);
          }
      }

I have tried to use sort descriptor and ColumnSortDescriptor but none of these worked for me. Please suggest how can i acomplish this behaviour.
Pankaj
Top achievements
Rank 1
 asked on 18 Nov 2011
10 answers
427 views
Hello,

is it possible to have  a left aligned RadMaskedNumericInput field? 

Setting the HorizontalContentAlignment to left will show a left aligned value in view mode, but while editing there is a margin on the left side of the value. i tried to set the TextBoxStyle, but with no success.

i know that numeric field typically aligned right, but sometimes there are exceptions ;)

Koren
Top achievements
Rank 1
 answered on 17 Nov 2011
4 answers
100 views
I got a message today, when I got into VS 2010, that there was an upgrade to the Telerik WPF toolkit to 2011.3.1116.0.  However, I'm now having problems getting it installed.  I think it may be because I hadn't launched VS 2010 as an administrator; I ran it as a regular user.  When I did, it complained that it couldn't uninstall something (the preivous version, I believe).  Now, every time I get into VS 2010 I get a message saying that VS Extension Manager sees an update from version 2011.2.915.0 to 2011.3.1116.0.  When I tell it to run the upgrade, it now fails with the error message:

"Microsoft Visual Studio
The extension could not be installed because the folllwing error occurred:
Telerik WPF VSExtensions is already installed"

I'm running this on a Windows 7 Ultimate machine, 32-bit.
Rod
Top achievements
Rank 1
 answered on 17 Nov 2011
3 answers
136 views
i want to remove the match case button or disable it. for string datatypes , in the data filter . can anyone plz help me with this.
Chandan
Top achievements
Rank 1
 answered on 17 Nov 2011
1 answer
69 views
Are there any examples using the RadScheduleView in a continuous manner in the Timeline view.  I'd like to hide the date range selection and just allow the user to scroll forever.  First thought is I could respond to an event when a new day is scrolled into view and just expand the underlying window.  Is this possible? Is there already an example of this somewhere?

Thanks!
Rosi
Telerik team
 answered on 17 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?