Telerik Forums
UI for WPF Forum
3 answers
167 views
Telerik RadControls for WPF Q1 2011 SP1

I have a grid hierarchy, I want to Export to Exel.
I used this code, but I don't have anything of the Grid Hierarchy in Excel

SaveFileDialog dialog = new SaveFileDialog();
           dialog.DefaultExt = extension;
           dialog.Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", "xls", "Excel");
           dialog.FilterIndex = 1;
           if (dialog.ShowDialog() == true)
           {
               using (Stream stream = dialog.OpenFile())
               {
                   GridViewExportOptions exportOptions = new GridViewExportOptions();
                   exportOptions.Format = format;
                   exportOptions.ShowColumnFooters = true;
                   exportOptions.ShowColumnHeaders = true;
                   exportOptions.ShowGroupFooters = true;
                   RadGridView1.Export(stream, exportOptions);
               }
           }

I read foros where the controls don't support this Export to Excel.
Please, really I need your help.


Dimitrina
Telerik team
 answered on 19 Jan 2012
2 answers
130 views
I have a radGridView, when the radGridView SelectionChanged event fires off, I need to set a combo to IsDropDownOpen = true;  

The issue is that the IsDropDownOpen property is being set but the combo will not remain dropped down when the grid selection is changed using a mouse click.

The combo will remain dropped down when the grid selection is changed using the keyboard.

Either selection method calls the same method to set the IsDropDownOpen property.

I am using the 2011 - Q3 version of the wpf controls.

Any Ideas?
flyingelvis
Top achievements
Rank 1
 answered on 19 Jan 2012
2 answers
100 views
My terminology is probably off here but what I need to do is to be able to make a pane that is currently minimized (not pinned and thus not visible except for the tab header) active (not pinned but it's contents now visible just as though I had moused over the tab). What I have is something kind of like the output tab of visual studio where I do a build and I want the output tab to be shown - currently I'm just calling PinAllPanes() in order to make sure the pane is shown but this isn't what I want (I don't want to pin the pane and I don't want to have to pin other panes in the group. I if the RadPane.IsActive setter were public I believe that would give me what I want, but, it's not.

Any help would be appreciated.
Gary
Top achievements
Rank 1
 answered on 19 Jan 2012
1 answer
78 views
In TeeListView if I set CanUserInsertRowS = true and ShowInsertRow = true when I actually insert a row the new item is always inserted at the top level.  Is there a way to insert it as a child of the selected node or at the same level as the selected node?
Nick
Telerik team
 answered on 19 Jan 2012
3 answers
71 views
I have to refresh the specific row. But I don't want to refresh the whole gridview.
Vishwajeet
Top achievements
Rank 1
 answered on 19 Jan 2012
1 answer
111 views
Hi,

I'm trying to use a RichTextBox in a RadTreeListView. Below is the xaml

<telerik:RadTreeListView Grid.Row="1"
                                 HorizontalAlignment="Stretch"
                                 VerticalAlignment="Stretch"
                                 x:Name="RTLView"
                                 AutoGenerateColumns="False"
                                 IsSynchronizedWithCurrentItem="True"
                                 IsReadOnly="True"
                                 ItemsSource="{Binding Items}"
                                 ItemContainerStyle="{StaticResource ItemContainerStyle}"
                                 IsFilteringAllowed="False">
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
            </telerik:RadTreeListView.ChildTableDefinitions>
            <telerik:RadTreeListView.Columns>
                <telerik:GridViewDataColumn Width="350">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <RichTextBox x:Name="ItemName"
                                         ux:RichTextBoxHelper.DocumentMarkup="{Binding Name, UpdateSourceTrigger=PropertyChanged}"
                                         Margin="{Binding Margin}"
                                         Padding="0,5,0,0"
                                         VerticalScrollBarVisibility="Auto"
                                         Cursor="Arrow"
                                         Focusable="False"
                                         MaxHeight="80" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
       </telerik:RadTreeListView.Columns>
 </telerik:RadTreeListView>


When i run the application, the content renders properly the first time but when i select any row, I'm getting the following exception.

System.InvalidCastException was unhandled by user code
  Message=Unable to cast object of type 'System.Windows.Documents.Paragraph' to type 'System.Windows.UIElement'.
  Source=Telerik.Windows.Controls.GridView
  StackTrace:
       at Telerik.Windows.Controls.SelectableTextBoxDragHandler.OnMouseLeftButtonDown(Object sender, MouseButtonEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\SelectableTextBoxDragHandler.cs:line 28
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Window.ShowHelper(Object booleanBox)
       at System.Windows.Window.ShowDialog()
  InnerException:


Earlier i used the same RichTextBox in a ListView, it worked fine. After changing to RadTreeListView I'm facing issues.

Please help!
Vlad
Telerik team
 answered on 19 Jan 2012
0 answers
70 views
Hi

i bind DataTable to GridView.
and then i used CustomAggregateFunction(StandardDeviationFunction)...

then occur Exception : 
InvalidOperationException.
No generic method 'StdDev' on type 'RadGridViewTest.Statistics' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.

how to do i????

thank you
Guntae Park
Top achievements
Rank 1
 asked on 19 Jan 2012
10 answers
389 views
Hi Telerik,

I have the xaml below, which gives me a control that responds beautifully to mouse-right-clicks and displays the context menu. The special key on my keyboard for context menu is ignored, however. Any clues as to what I am doing wrong?

Thanks,

Anders, Denmark

<UserControl x:Class="Rap1D.Rap1D_WPF.Controls.Navigator.NavigatorControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:WorkspaceExplorer="clr-namespace:Rap1D.ViewModelLayer.Implementations.Commands.WorkspaceExplorer;assembly=Rap1D.ViewModelLayer.Implementations"
             xmlns:TreeViewItems="clr-namespace:Rap1D.ViewModelLayer.Implementations.TreeViewItems;assembly=Rap1D.ViewModelLayer.Implementations"
             xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation">
    <DockPanel>
        <TreeView ItemsSource="{Binding Path=Children, NotifyOnSourceUpdated=True}" Name="treeview">
            <TreeView.ItemContainerStyle>
                <Style TargetType="{x:Type TreeViewItem}">
                    <Setter Property="WorkspaceExplorer:MouseDoubleClickBehavior.MouseDoubleClick" Value="{Binding ActivateItemCommand}" />

                    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
                    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
                    <Setter Property="FontWeight" Value="Normal" />
                    <Style.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="FontWeight" Value="Bold" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </TreeView.ItemContainerStyle>

            <TreeView.Resources>
                <HierarchicalDataTemplate x:Key="MenuItemTemplate"
                                 ItemsSource="{Binding ContextMenuItems}">
                    <TextBlock Text="{Binding Text}" />
                </HierarchicalDataTemplate>
                <HierarchicalDataTemplate DataType="{x:Type TreeViewItems:ProjectViewModel}" ItemsSource="{Binding Children}">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Margin="3,0" Source="Images\Project.png" />
                        <TextBlock Text="{Binding DisplayName}" />
                    </StackPanel>
                </HierarchicalDataTemplate>

                <HierarchicalDataTemplate DataType="{x:Type TreeViewItems:ProductViewModel}" ItemsSource="{Binding Children}">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Margin="3,0" Source="Images\Product.png" />
                        <TextBlock Text="{Binding DisplayName}" />
                    </StackPanel>
                </HierarchicalDataTemplate>

                <HierarchicalDataTemplate DataType="{x:Type TreeViewItems:ProductDesignViewModel}" ItemsSource="{Binding Children}">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Margin="3,0" Source="Images\ProductDesign.png" />
                        <TextBlock Text="{Binding DisplayName}" />
                    </StackPanel>
                </HierarchicalDataTemplate>

                <DataTemplate DataType="{x:Type TreeViewItems:ProductComponentViewModel}">
                    <StackPanel Orientation="Horizontal">
                        <Image Width="16" Height="16" Margin="3,0" Source="Images\Component.png" />
                        <TextBlock Text="{Binding DisplayName}" />
                    </StackPanel>
                </DataTemplate>
            </TreeView.Resources>
            <Controls:RadContextMenu.ContextMenu>
                <Controls:RadContextMenu x:Name="radContextMenu"
                                         ItemTemplate="{StaticResource MenuItemTemplate}">
                    <Controls:RadMenuItem Header="C_ut"
                                          Command="{Binding CutCommand}" />
                    <Controls:RadMenuItem Header="Copy"
                                          Command="{Binding CopyCommand}" />
                    <Controls:RadMenuItem Header="Paste"
                                          Command="{Binding PasteCommand}" />
                    <Controls:RadMenuItem Header="Delete"
                                          Command="{Binding DeleteCommand}" />
                    <Controls:RadMenuItem Header="_Editor"
                                          Command="{Binding ShowEditorCommand}" />

                </Controls:RadContextMenu>
            </Controls:RadContextMenu.ContextMenu>
        </TreeView>
    </DockPanel>
</UserControl>
Hristo
Telerik team
 answered on 19 Jan 2012
3 answers
120 views
Hi,

Is there a way to reload the radcarousel in runtime?
It seems that there is no refresh() or reload() method.
Please advise.

Best Regards,
Jog
Vlad
Telerik team
 answered on 19 Jan 2012
1 answer
197 views
Hello,
I am using telerik new Radar charts. 

I am looking for a way to customise Radar Categories and Labels.
My objective is to change color and font of each label and category individually (see attached file for example)
Is this possible?

Thank you for answer. 

Aldric
Vladimir Milev
Telerik team
 answered on 18 Jan 2012
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?