Telerik Forums
UI for WPF Forum
7 answers
405 views

Hi,

I have used PastingCellClipboardContent event on a wpf radgridview in order to convert the value pasted to a value in a combobox as described in: http://docs.telerik.com/devtools/wpf/controls/radgridview/clipboard/pasting.html

My grid has definition:

ClipboardCopyMode="Cells"
ClipboardPasteMode="Cells"​

However, when copying a cell, then adding a new row and then trying to paste the content, this event does not fire (and produces very odd behaviour in the grid, but that's besides the point).

Any ideas?

Thanks.

Maya
Telerik team
 answered on 21 Oct 2015
1 answer
159 views

Hi,

When I added Telerik to my application, I used .Net framework 4.5 and platform target x86. I used a RadCarousel and it worked perfect. Later I had to switch to .Net 4.0 framework and change the Telerik version to v.2014.3.1021.40. But now I have a problem. I reduced the code to a minimum for a test purposes:

<Window x:Class="myBRH.AddPhotosWnd"
         
        Title="AddPhotosWnd" Height="300" Width="1024">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10*"/>
            <ColumnDefinition Width="135*"/>
            <ColumnDefinition Width="855*"/>
            <ColumnDefinition Width="16*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="10*"/>
            <RowDefinition Height="3*"/>
            <RowDefinition Height="36*"/>
            <RowDefinition Height="3*"/>
        </Grid.RowDefinitions>
        <Button
            Grid.Column="1" Grid.Row="1" Click="Button_Click"/>
 
        <telerik:RadCarousel x:Name="rc" Grid.Column="1" Grid.ColumnSpan="2"
                             Grid.Row="3" HorizontalScrollBarVisibility="Hidden"/>
    </Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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.Shapes;
 
namespace myBRH
{
    /// <summary>
    /// Interaction logic for AddPhotosWnd.xaml
    /// </summary>
    public partial class AddPhotosWnd : Window
    {
        public AddPhotosWnd()
        {
            InitializeComponent();
        }
 
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string str = "sdfsd";
            rc.Items.Add(str);
            rc.BringDataItemIntoView(rc.Items[0]);
        }
    }
}
 

 The problem:

When second item is added to the RadCarousel.Items,  System.InvalidOperationException is thrown  with the message: "Collection was modified; enumeration operation may not execute."

Exception is not thrown if I comment out the rc.BringDataItemIntoView(rc.Items[0]); method call.

 

 

 

 

 

<Window x:Class="mytest.Wnd"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       
        Height="300" Width="1024">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10*"/>
            <ColumnDefinition Width="135*"/>
            <ColumnDefinition Width="855*"/>
            <ColumnDefinition Width="16*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="10*"/>
            <RowDefinition Height="3*"/>
            <RowDefinition Height="36*"/>
            <RowDefinition Height="3*"/>
        </Grid.RowDefinitions>
        <Button
            Grid.Column="1" Grid.Row="1" Click="Button_Click"/>
 
        <telerik:RadCarousel x:Name="rc" Grid.Column="1" Grid.ColumnSpan="2"
                             Grid.Row="3" HorizontalScrollBarVisibility="Hidden"/>
    </Grid>
</Window>
Maya
Telerik team
 answered on 21 Oct 2015
1 answer
57 views

Hello,

        I am facing a problem related to dragging an appointment of recurrence series. I have created a recurring appointment which is weekly but when i drag it to some other date as in attached picture and it won't allow me to do that. Thanks!

Nasko
Telerik team
 answered on 21 Oct 2015
3 answers
179 views

The Click Event of any minimized icon does not render the correct screen if any icon is collapsed between minimized icons.
Kindly find the ​attached sample project.

If you run the project, it will show you 5 icon ​as minimized icon. and when you click any minimized icon it will work fine. But you Collapsed the last RadOutlookBarItem and run the project then it will show you 4 icon ​as minimized icon.and if you click any it will not render/open the correct one. it is always opening the first one.This is issue is occurring on Telrik Version14.

In my project, i am dynamically ,showing and hide the outlookbar according to configuration but Click Event of any minimized icon does not render the correct screen if any icon is collapsed between minimized icons.

Kindly explain, why it is not working properly as it suppose to be. and what is the possible solution.

 

 

following is the code for sample project

 

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        MaxHeight="400"
Title="Window1">
<Grid>
<!--************* OUTLOOK BAR *************-->
<telerikNavigation:RadOutlookBar x:Name="outlookBar" Width="250" HorizontalAlignment="Left" Margin="0,100,0,0">
<!--****** MAIL ******-->
<telerikNavigation:RadOutlookBarItem Header="Mail" FontWeight="Bold"
Icon="Images/mailBig.png" SmallIcon="Images/mailSmall.png" Tag="Mail">
<telerikNavigation:RadTreeView IsLineEnabled="True" x:Name="foldersTreeView">
<telerikNavigation:RadTreeViewItem Header="Personal Folders"
DefaultImageSrc="Images/1PersonalFolders.png" IsExpanded="True">
<telerikNavigation:RadTreeViewItem Header="Deleted Items"
DefaultImageSrc="Images/2DeletedItems.png" />
<telerikNavigation:RadTreeViewItem Header="Drafts"
DefaultImageSrc="Images/3Drafts.png" />
<telerikNavigation:RadTreeViewItem x:Name="MessagesTreeView"
Header="Inbox(3)" DefaultImageSrc="Images/4Inbox.png"
IsExpanded="True">
<telerikNavigation:RadTreeViewItem.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source="Images/letter.png" />
<TextBlock Text="{Binding From}" Margin="9 0 0 0" />
</StackPanel>
</DataTemplate>
</telerikNavigation:RadTreeViewItem.ItemTemplate>
</telerikNavigation:RadTreeViewItem>
<telerikNavigation:RadTreeViewItem Header="Junk E-mails"
DefaultImageSrc="Images/junk.png" />
<telerikNavigation:RadTreeViewItem Header="Outbox"
DefaultImageSrc="Images/outbox.png" />
<telerikNavigation:RadTreeViewItem Header="Sent Items"
DefaultImageSrc="Images/sent.png" />
</telerikNavigation:RadTreeViewItem>
</telerikNavigation:RadTreeView>
</telerikNavigation:RadOutlookBarItem>
<!--********** CALENDAR **********-->
<telerikNavigation:RadOutlookBarItem Header="Calendar" FontWeight="Bold"
Icon="Images/calendarBig.png" SmallIcon="Images/calendarSmall.png">
<telerikInput:RadCalendar VerticalAlignment="Top" Margin="3" />
</telerikNavigation:RadOutlookBarItem>
<!--**********  CONTACTS **********-->
<telerikNavigation:RadOutlookBarItem Header="Contacts" FontWeight="Bold"
Icon="Images/contactsBig.png" SmallIcon="Images/contactsSmall.png"
Tag="Contacts">
<ListBox x:Name="ContactsListBox" BorderBrush="{x:Null}" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="14 0 14 0">
<Image Source="Images/contact.png" />
<TextBlock Text="{Binding FirstName}" Margin="10 0 0 0"
VerticalAlignment="Center" />
<TextBlock Text="{Binding LastName}" Margin="2 0 0 0"
VerticalAlignment="Center" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</telerikNavigation:RadOutlookBarItem>
<!--******* TASKS *******-->
<telerikNavigation:RadOutlookBarItem Header="Tasks" FontWeight="Bold"
Icon="Images/tasksBig.png" SmallIcon="Images/tasksSmall.png">
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15 5">
<RadioButton Content="To-Do List" IsChecked="True" Margin="0 5 0 5" />
<RadioButton Content="Simple List" Margin="0 5 0 5" />
<RadioButton Content="Detailed List" Margin="0 5 0 5" />
<RadioButton Content="Active Tasks" Margin="0 5 0 5" />
<RadioButton Content="Next Seven Days" Margin="0 5 0 5" />
<RadioButton Content="Overdue Tasks" Margin="0 5 0 5" />
</StackPanel>
</telerikNavigation:RadOutlookBarItem>
<!--******* NOTES *******-->
<telerikNavigation:RadOutlookBarItem Header="Notes" FontWeight="Bold"
Icon="Images/notesBig.png" SmallIcon="Images/notesSmall.png">
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15 5">
<RadioButton Content="Icons" IsChecked="True" Margin="0 5 0 5" />
<RadioButton Content="Notes List" Margin="0 5 0 5" />
<RadioButton Content="Last Seven Days" Margin="0 5 0 5" />
<RadioButton Content="By Category" Margin="0 5 0 5" />
<RadioButton Content="Outlook Data Files" Margin="0 5 0 5" />
<RadioButton Content="Overdue Tasks" Margin="0 5 0 5" />
</StackPanel>
</telerikNavigation:RadOutlookBarItem>
<!--************* FOLDER LIST *************-->
<telerikNavigation:RadOutlookBarItem Header="Folder List" FontWeight="Bold"
Icon="Images/foldersBig.png" SmallIcon="Images/foldersSmall.png">
<telerikNavigation:RadTreeView IsLineEnabled="True">
<telerikNavigation:RadTreeViewItem Header="Personal Folders"
DefaultImageSrc="Images/1PersonalFolders.png" IsExpanded="True">
<telerikNavigation:RadTreeViewItem Header="Deleted Items"
DefaultImageSrc="Images/2DeletedItems.png" />
<telerikNavigation:RadTreeViewItem Header="Drafts"
DefaultImageSrc="Images/3Drafts.png" />
<telerikNavigation:RadTreeViewItem Header="Inbox"
DefaultImageSrc="Images/4Inbox.png" />
<telerikNavigation:RadTreeViewItem Header="Junk E-mails"
DefaultImageSrc="Images/junk.png" />
<telerikNavigation:RadTreeViewItem Header="Outbox"
DefaultImageSrc="Images/outbox.png" />
<telerikNavigation:RadTreeViewItem Header="Sent Items"
DefaultImageSrc="Images/sent.png" />
</telerikNavigation:RadTreeViewItem>
</telerikNavigation:RadTreeView>
</telerikNavigation:RadOutlookBarItem>
<!--*********** SHORTCUTS ***********-->
<telerikNavigation:RadOutlookBarItem Header="Shortcuts" FontWeight="Bold"
Icon="Images/shortcutsBig.png" SmallIcon="Images/shortcutsSmall.png">
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15 5">
<Button Content="Add New Group" />
<Button Content="Add New Shortcut" />
</StackPanel>
</telerikNavigation:RadOutlookBarItem>

            <telerikNavigation:RadOutlookBarItem Header="Events" FontWeight="Bold"
Icon="Images/shortcutsBig.png" SmallIcon="Images/notesSmall.png">
                <StackPanel VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15 5">
                    <Button Content="Add New Events" />
                    
                </StackPanel>
            </telerikNavigation:RadOutlookBarItem>


            <telerikNavigation:RadOutlookBarItem Header="Reminder" FontWeight="Bold"
Icon="Images/shortcutsBig.png" SmallIcon="Images/shortcutsSmall.png" Visibility="Collapsed">
                <StackPanel VerticalAlignment="Top" HorizontalAlignment="Left" Margin="15 5">
                    <Button Content="Add New Reminder" />
                    
                </StackPanel>
            </telerikNavigation:RadOutlookBarItem>
            
        </telerikNavigation:RadOutlookBar>
</Grid>
</Window>

 

 

 

Thanks

Regards

Mudasser

 

 

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Oct 2015
8 answers
734 views
Hi,

I've run into an interesting/bad behavior of the RadGridView:

I have a RadGridView (with CanUserDeleteRows="True" ) that I can change the ItemsSource based on a ComboBox.  
Initially, I am able to delete rows.  However, after I switch the ItemsSource, I am unable to delete rows *unless I first put the grid manually into edit mode and back again*.   My desired behavior is for the grid to behave the same regardless of whether or not the grid's ItemsSource has changed.

I have tried to attach an example of this behavior to this message, but I get an error message saying:

"The selected file(s) cannot be attached because it may exceed the maximum attachment size (2 MB) or is from not allowed type (allowed: .gif, .jpg, .jpeg, .png)."

The file I'm attempting to upload ends with .zip and is 8.45kb in size....

Please let me know:
1) How do I attach a 8.45kb .zip file?
2) How do I get the behavior I require from the RadGridView?

Thanks,
Dustin
Stefan
Telerik team
 answered on 20 Oct 2015
1 answer
53 views
I have a RadGridView with a GridViewComboBoxColumn. I have disabled some items based on a property, but tehey still show on text search.
Stefan
Telerik team
 answered on 20 Oct 2015
1 answer
114 views

Hello

I am using the radgridview and when adding a row I receive sometimes the following error message:

System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.<ShowInsertRowIfNeeded>b__3f(FrameworkElement f)
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass84.<CallbackAction>b__83(FrameworkElement f)
   bei Telerik.Windows.Controls.GridView.GridViewDataControl.FlatLayoutStrategy.<>c__DisplayClassfa.<ScrollRowIndexIntoView>b__f5()
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
   bei System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Windows.Threading.DispatcherOperation.Invoke()
   bei System.Windows.Threading.Dispatcher.ProcessQueue()
   bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   bei System.Windows.Window.ShowHelper(Object booleanBox)
   bei System.Windows.Window.Show()
   bei System.Windows.Window.ShowDialog()
   bei Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean isModal)
   bei Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)...


Do you know what the source of this error message is? And even better how can I solve this or find a solution without this error message?

Note - we have been able to narrow it down to the following scenarios (at current time):
- the error occurs if I add very quickly in succession new rows to the grid
- the error occurs if the computer hard drive is maxed out and I add rows normally (not fast)

 

Sincerly,

Kasar

Stefan
Telerik team
 answered on 20 Oct 2015
3 answers
148 views

We are using the RadSpreadsheet in one of our projects. Some of the cells will contain data that can be elaborated on. We are styling those cells to look like they contain hyperlinks and when the user clicks on the cell, an additional view is spawned with more information.

 What we have not been able to acheive is changing the cursor value to 'Hand' to be more consitent with the hyperlink paradigm.

 

Any help is much appreciated.

Anna
Telerik team
 answered on 19 Oct 2015
4 answers
903 views

It's a simple one....

 

How can I Programmatically insert a Hyperlink into a cell?

 

Thanks.​

Anna
Telerik team
 answered on 19 Oct 2015
4 answers
236 views
Hi,
I'm using RadChartView and dynamically change font size of Axis title at runtime. But RadChartView doesn't rerender itself. The same problem appears when the font size of axis label is changed.
Could you give me some advice how to ensure that RadChartView will be rerendered in these situations?
Peter
Top achievements
Rank 1
 answered on 19 Oct 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?