Telerik Forums
UI for WPF Forum
4 answers
211 views
Hi,

I have downloaded the demo project in order to test it. Unifortunatly I cannot add a reference to the library :
  • Telerik.Windows.Data.dll
Also, I cannot use the datapager :

            <telerik:RadDataPager Name="xRadDataPager" Source="{Binding Items, ElementName=radGridView1}" PageSize="5" />
               
Any help please?

I'm working with the WPF demo project - VisualStudio 2012.

Regards,
Alice
Top achievements
Rank 1
 answered on 15 Oct 2013
7 answers
84 views

Hello,

We want to be able to block a row change when a user is editing a row and clicks on a different row in the RadGridView.

We have noticed that the RowValidating, RowValidated and RowEndEdit events are fired before the SelectionChanging event. This sounds logical but how can we see in RowValidating that the event is fired due to selecting an different row?

Kind regards,

Bert

Dimitrina
Telerik team
 answered on 15 Oct 2013
9 answers
244 views

Hello Telerik,

I updated my WPF project in VS 2012 with the Solution Update Wizard to 2013 Q2, since I get an exception when I open a .xaml file in the in VS which contains a RadGridView.

Greetings Uwe

Dimitrina
Telerik team
 answered on 15 Oct 2013
8 answers
419 views
Is it possible to send the pdf document to the Default or named printer without popping up the printer selection dialog?
Alexander
Telerik team
 answered on 15 Oct 2013
8 answers
400 views
Hi,
I'm using MvvM and the caliburn Micro toolset with the built in PropertyChangedBase.
On my view I have approximately 15 PropertyGrids with each about 12 properties.

In the background the user loads a xml file which is shown then in the view on the propertygrids.
When I fire the NotifyOfPropertyChange the ui blocks and it takes long till the ui reacts again.
The cpu usage goes up to ~25%. Is there a way to give this process more cpu usage or make the
NotifyOfPropertyChange threaded? 

Regards Markus
Klemens
Top achievements
Rank 1
 answered on 15 Oct 2013
13 answers
443 views

How to show hotkey in right part of menu item for RadMenuItem? Or how to add MenuItem to RadContextMenu? MenuItem wraps into RadMenuItem and looks ugly (I don't want to change HeaderTemplate because I think RadContextMenu should have better functionality than free analogs):

<t:RadContextMenu>    
   
<t:RadContextMenu.Items>
       
<MenuItem Header="Copy" Command="Copy" />
       
<t:RadMenuItem Header="Copy" Command="Copy" />
   
</t:RadContextMenu.Items>
</t:RadContextMenu>

enter image description here

Rosen Vladimirov
Telerik team
 answered on 15 Oct 2013
1 answer
147 views
Hi,

I am using the filtered event to catch a filter being applied to the grid successfully. I am using your GridViewHeaderMenu example and i'm finding that clearing down filterdescriptors doesn't fire the same filtered event? Should it? I guess not. In which case which event should I subscribe to to be notified that the filter descriptors collection has been cleared?

Many thanks.
Rossen Hristov
Telerik team
 answered on 15 Oct 2013
1 answer
123 views
currently, i am using on telerik RAD control version 2013.2.724.40. my assignment is to implement the dragdrop from RADGridview to itemcontrol. The itemscontrol contains a RADCartesianChart and when dropping a row from datagrid to itemcontrol to show the new chart for the related selected row.
suppose, when dropping the selected row item in existing RADCartesianChart, then new lineseries and y-Axis (multiple Y-axis) to be created in same chart. (it will share same X-axis). if user drops the selected row out side the RADCartesianChart (but, within the itemscontrol), then created new chart with in the item control. 

i have created ItemControlDragDropBehaviour as same as suggested in telerik's example. so, it works fine with itemscontrol. but, when i dropping the selected item with in existing chart in the itemscontros, it is not give the dropped chart control.

how to find the chart control when dropping in exact chart control when dropping over the chart control in the itemscontrol.


Code:

<telerik:RadGridView Grid.RowSpan="2" Width="280" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch"
                             Name="radGridView1" 
                             ItemsSource="{Binding  Path=ChannelList, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, IsAsync=True}"
                             AutoGenerateColumns="False" 
                            AllowDrop="True"
                             demo:GridViewDragDropBehavior.IsEnabled="True"
                             SelectionMode="Single"
                             IsReadOnly="True"
                             IsSynchronizedWithCurrentItem="True"
                             SelectedItem="{Binding Path=SelectedChannel, IsAsync=True,UpdateSourceTrigger=PropertyChanged}"
                                 IsFilteringAllowed="True"
                                 ShowInsertRow="False"                                 
                                 CanUserDeleteRows="False"                                 
                                 CanUserInsertRows="False"
                                 CanUserReorderColumns="False"
                                 GridLinesVisibility="Horizontal"
                                 RowIndicatorVisibility="Collapsed" Margin="0,0,70,0">
            <telerik:RadGridView.Resources>
                <DataTemplate x:Key="DraggedItemTemplate">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Dragging:"/>
                            <TextBlock Text="{Binding CurrentDraggedItem.Name}" FontWeight="Bold"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding CurrentDropPosition}" FontWeight="Bold" MinWidth="45"/>
                            <TextBlock Text=", (" Foreground="Gray" />
                            <TextBlock Text="{Binding CurrentDraggedOverItem.Name}"/>
                            <TextBlock Text=")" Foreground="Gray" />
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadGridView.Resources>
            <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="radGridContextMenu" ItemsSource="{Binding SubMenus, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>

            <telerik:RadGridView.RowStyle>
                <Style TargetType="telerik:GridViewRow">
                    <Setter Property="telerik:DragDropManager.AllowDrag"
                           Value="True" />
                    <Setter Property="telerik:DragDropManager.TouchDragTrigger"
                           Value="TapAndHold"/>
                </Style>
            </telerik:RadGridView.RowStyle>

            
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Subsystem" IsSortable="True" IsFilterable="True" IsVisible="False" IsGroupable="True" Width="*" DataMemberBinding="{Binding SubsystemText}"/>
                <telerik:GridViewDataColumn Header="Show" Width="30">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsThreeState="False" IsChecked="{Binding Selected, Mode=TwoWay}" FlowDirection="RightToLeft" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="ID" IsSortable="True" IsFilterable="True" IsGroupable="True" Width="50" DataMemberBinding="{Binding SubsystemId}"/>
                <telerik:GridViewDataColumn Header="Signal" IsSortable="True" IsFilterable="True" IsGroupable="True" Width="*" DataMemberBinding="{Binding Name}">
                    <telerik:GridViewDataColumn.ToolTipTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Name}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.ToolTipTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
      
        <ScrollViewer  Margin="2" VerticalAlignment="Stretch"  CanContentScroll="True" Grid.Column="1" Grid.Row="1">
            <ItemsControl x:Name="chartHost"  BorderThickness="2"  BorderBrush="Black"   VerticalAlignment="Stretch"  demo:ItemControlDragDropBehaviour.IsEnabled="True" AllowDrop="True"  ItemsSource="{Binding SelectedSignals, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">

            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical" Margin="2" Background="Chocolate" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>

            <ItemsControl.ItemTemplate>
                <DataTemplate>
  <Border BorderThickness="1" BorderBrush="Black" Grid.Row="0">
            <StackPanel Orientation="Vertical">
         <chart:RadCartesianChart x:Name="Chart1"   Height="400" Grid.Row="0" Palette="Windows8" Margin="6,0,20,0" >
            <chart:RadCartesianChart.Resources>
                <DataTemplate x:Key="PointTemplate1">
                    <Ellipse Height="6" Width="6" Fill="#FF8EC441" />
                </DataTemplate>
                <DataTemplate x:Key="PointTemplate2">
                    <Ellipse Height="6" Width="6" Fill="#FF1B9DDE" />
                </DataTemplate>
            </chart:RadCartesianChart.Resources>
            <chart:RadCartesianChart.HorizontalAxis>
                <chartView:DateTimeContinuousAxis PlotMode="OnTicks" LabelFitMode="Rotate" LabelRotationAngle="45"  MajorStepUnit="Second" Minimum="{Binding AxisXMinValue}"
                                                LabelInterval="5"
                                                LabelFormat="hh:mm:ss" />
            </chart:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="Y" StripLinesVisibility="Y" MajorXLineStyle="{StaticResource StripLinesStyle}" MajorYLineStyle="{StaticResource StripLinesStyle}"/>
            </telerik:RadCartesianChart.Grid>
            <chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis />
            </chart:RadCartesianChart.VerticalAxis>
             <demo:LinearSeriesSourceChange.LinearSeriesSource>
                        <Binding Path="ChartList" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged"  />
             </demo:LinearSeriesSourceChange.LinearSeriesSource>
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior ZoomMode="Both" PanMode="Both" >
                </telerik:ChartPanAndZoomBehavior>
            </telerik:RadCartesianChart.Behaviors>
         
        </chart:RadCartesianChart>





 public static class LinearSeriesSourceChange
    {

        public static readonly DependencyProperty LinearSeriesSourceProperty = DependencyProperty.RegisterAttached("LinearSeriesSource",
            typeof(ObservableCollection<HistoricalChannel>), typeof(LinearSeriesSourceChange), new PropertyMetadata(OnLinearSeriesSourceChanged));

        public static ObservableCollection<HistoricalChannel> GetLinearSeriesSource(DependencyObject obj)
        {
            return (ObservableCollection<HistoricalChannel>)obj.GetValue(LinearSeriesSourceProperty);
        }

        public static void SetLinearSeriesSource(DependencyObject obj, ObservableCollection<HistoricalChannel> value)
        {
            obj.SetValue(LinearSeriesSourceProperty, value);
        }

        private static void OnLinearSeriesSourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            ObservableCollection<string> s = new ObservableCollection<string>();
            s.Add("#8ec441");
            s.Add("#1b9dde");
            s.Add("#f59700");
            s.Add("#d4df32");
        

            RadCartesianChart chart = sender as RadCartesianChart;
            if (chart == null)
                return;
            ObservableCollection<HistoricalChannel> seriesModel = e.NewValue as ObservableCollection<HistoricalChannel>;

            int iCount = 0;
            LinearAxis linearAxis = chart.VerticalAxis as LinearAxis;
            List<CartesianSeries> generatedSeries = new List<CartesianSeries>();
            chart.Series.Clear();
            foreach (HistoricalChannel histriocallist in seriesModel)
            {


                //        CategoricalSeriesDescriptor a = new CategoricalSeriesDescriptor();
                RadObservableCollection<SalesRevenue> list = histriocallist.Data;
                // chart.Series.Clear();

                LineSeries a = new LineSeries();
                a.ItemsSource = list;
               
                LineSeries lineSeries = new LineSeries();
                string pointTemplatePath = string.Format("PointTemplate{0}", iCount + 1);
                lineSeries.PointTemplate = chart.Resources[pointTemplatePath] as DataTemplate;
                
                SeriesLegendSettings legend1 = new SeriesLegendSettings() { Title = "My Title" + iCount.ToString() };
                lineSeries.LegendSettings = legend1;
                lineSeries.CategoryBinding = new PropertyNameDataPointBinding("Timestamp");
                lineSeries.ValueBinding = new PropertyNameDataPointBinding("Revenue");
                lineSeries.ItemsSource = list;

                if (iCount != 0)
                 {
                     linearAxis = new LinearAxis();
                 }
                 if (iCount % 2 == 1)
                 {
                     if (linearAxis != null)
                     {
                         linearAxis.HorizontalLocation = AxisHorizontalLocation.Right;
                         linearAxis.Title = "Tile" + (iCount + 1).ToString();
                         linearAxis.ElementBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString(s[iCount]));
                         if (iCount != 0)
                         {
                             lineSeries.VerticalAxis = linearAxis;
                         }
                       
                     }

                 }
                 else
                 {
                     linearAxis = new LinearAxis();
                     linearAxis.HorizontalLocation = AxisHorizontalLocation.Left;
                     
                     linearAxis.Title = "Tile" + (iCount + 1).ToString();
                     linearAxis.ElementBrush = new SolidColorBrush((Color)ColorConverter.ConvertFromString(s[iCount]));
                     lineSeries.VerticalAxis = linearAxis;
                 }
          
                chart.Series.Add(lineSeries);
                iCount++;
            }
         }
       }
    }
 
Senthil kumar
Top achievements
Rank 1
 answered on 15 Oct 2013
2 answers
134 views
I am having a couple of issues regarding scrolling and sizing of the gant control.

As you can see from my attached screen shot I have 3 tasks bound to the control. I am unable to scroll the right panel horizontally to view 2 out of the 3 tasks. Not sure what I'm doing wrong?

I'm also having an issue stretching the control to fill the grid cell.

Many thanks.
Rob
Top achievements
Rank 1
Iron
Iron
 answered on 14 Oct 2013
2 answers
234 views
Hi,

I have a RadDiagram and changed the Shape Style to have a good visible selection rectangle.
Further I added a RadDiagramNavigationPane.

The problem - the preview doesn't update.
To reproduce
- start the application, select a shape.
- open the RadDiagramNavigationPane

Now (as expected) I can see the selected Shape.

Next I select a different Shape - the preview in the RadDiagramNavigationPane doesn't reflect this change.
Opening / closing the RadDiagramNavigationPane doesn't change anything.
But if I mess around with my window (change size or move to a different screen) the preview is redrawn.
And the newly selected shape is now also select in the preview.

I guess I can't ask my users to resize there window to see changes in the preview :)
Just kidding - the question is - is there a way to enforce such a refresh?

By the way - I use MVVM - so a "On....Event" in code behind is not what I'm searching for.

Thanks
Manfred
ManniAT
Top achievements
Rank 2
 answered on 14 Oct 2013
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?