using System;using System.Windows;using Telerik.Windows.Controls;namespace WpfApplication2{ public partial class MainWindow : Window { public MainWindow() { StyleManager.ApplicationTheme = new Expression_DarkTheme(); InitializeComponent(); } }}<Window x:Class="WpfApplication2.MainWindow" xmlns:tkqs="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls" Title="MainWindow" Height="350" Width="525"> <Grid tkqs:ThemeAwareBackgroundBehavior.IsEnabled="True" tk:StyleManager.Theme="Expression_Dark"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlock" tk:StyleManager.Theme="Expression_Dark" /> <TextBox HorizontalAlignment="Left" Margin="5" Text="TextBox" tk:StyleManager.Theme="Expression_Dark" Grid.Row="1" /> <Button Content="Button" HorizontalAlignment="Left" Margin="5" tk:StyleManager.Theme="Expression_Dark" Grid.Row="2" /> </Grid></Window>I have a GridView where the ItemsSource is bound to the PagedSource property of a DataPager. The DataPager ItemsSource is bound to an EntityDataSource. The problem is that this is blocking my UI thread. The GridView has a "DataLoadMode" property which can be set to Asynchronous... but the pager doesn't. How would I go about loading the data to the pager asynchronously? I tried doing this in another thread but I keep getting a cross-thread exception even though I use the dispatcher to set the property to which the pager is bound.
<telerik:RadGridView x:Name="RadGridView1" Grid.Row="0" Margin="5,5,5,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AlternateRowBackground="LightBlue" AlternationCount="2" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserFreezeColumns="False" CanUserInsertRows="False" DataLoadMode="Asynchronous" GroupRenderMode="Nested" IsReadOnly="True" ItemsSource="{Binding ElementName=DataPager1, Path=PagedSource}" RowIndicatorVisibility="Collapsed" ShowGroupPanel="False" telerik:StyleManager.Theme="Summer"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Width="60" DataMemberBinding="{Binding StoreNumber}" Header="Store" ShowDistinctFilters="True" ShowFieldFilters="False" TextAlignment="Center" /> <telerik:GridViewDataColumn Width="80" DataFormatString="dd-MMM-yyyy" DataMemberBinding="{Binding ASNDate}" Header="Ship Date" ShowDistinctFilters="False" SortingState="Descending" TextAlignment="Center" /> <telerik:GridViewDataColumn Width="Auto" MinWidth="80" DataMemberBinding="{Binding PONumber}" Header="PO" ShowDistinctFilters="False" TextAlignment="Center" /> <telerik:GridViewDataColumn Width="80" DataFormatString="dd-MMM-yyyy" DataMemberBinding="{Binding PODate}" Header="PO Date" ShowDistinctFilters="False" TextAlignment="Center" /> <telerik:GridViewDataColumn Width="Auto" MinWidth="80" DataMemberBinding="{Binding InvoiceNumber}" Header="Invoice" ShowDistinctFilters="False" TextAlignment="Center" /> <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding ToteID}" Header="Tote" ShowDistinctFilters="True" TextAlignment="Center"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <TextBlock Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"> <Hyperlink Click="OnToteClick" Tag="{Binding}"> <TextBlock Width="Auto" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding ToteID}" /> </Hyperlink> </TextBlock> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn Width="80" DataFormatString="dd-MMM-yyyy" DataMemberBinding="{Binding Closed}" Header="Completed" ShowDistinctFilters="False" /> <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding ClosedByName}" Header="Complete By" ShowDistinctFilters="True" ShowFieldFilters="False" TextAlignment="Center" /> </telerik:RadGridView.Columns> </telerik:RadGridView> <telerik:RadDataPager x:Name="DataPager1" Grid.Row="1" Width="{Binding ActualWidth, ElementName=RadGridView1}" Margin="5,0,5,5" DisplayMode="FirstLastPreviousNextNumeric" PageSize="{Binding PageSize, Mode=TwoWay}" Source="{Binding ShipmentData}" telerik:StyleManager.Theme="Summer" />
public class ShipmentsViewModel : ViewModelBase { private readonly TIMS.Data.TIMSContext ctx =new Data.TIMSContext(); public ShipmentsViewModel() { } #region Properties private int PageSizeValue = 20; public int PageSize { get { return PageSizeValue; } set { SetPropertyValue((() => PageSize), ref PageSizeValue, value); } } private QueryableEntityCollectionView<TIMS.Data.Entities.ToteView> ShipmentDataValue; public QueryableEntityCollectionView<TIMS.Data.Entities.ToteView> ShipmentData { get { return ShipmentDataValue; } private set { SetPropertyValue((() => ShipmentData), ref ShipmentDataValue, value); } } #endregion #region Methods public override void OnNavigatedTo(Uri view, object data) { try { IsBusy = true; System.Threading.ThreadPool.QueueUserWorkItem(delegate { var shipments = new QueryableEntityCollectionView<Data.Entities.ToteView>(((IObjectContextAdapter)ctx).ObjectContext, "ToteViews"); if (App.Store != null) { shipments.FilterDescriptors.Add(new FilterDescriptor("StoreNumber", FilterOperator.IsEqualTo, App.Store.Value, false)); } App.Current.Dispatcher.Invoke(new Action(delegate { ShipmentDataValue = shipments; IsBusy = false; })); }); } catch (Exception e) { App.Current.Dispatcher.BeginInvoke(new Action(delegate { var dlg = new ChildWindows.ErrorDialog("0012: An unknown error occured."); App.LogError(e); dlg.ShowDialog(); IsBusy = false; })); } } #endregion #region Commands #endregion }Hello
Can I load some portion of data programmatically? For example:
class Work { public string WorkTitle { get; set; } }var query = generateQueryFor<Work>.OrderBy(w => w.WorkTitle);var virtualQuery = new VirtualQueryableCollectionView(query) { LoadSize = 50 };virtualQuery.ItemsLoading += (sender1, eventArgs1) =>{ //event doesn't firing};virtualQuery.ItemsLoaded += (sender2, eventArgs2) =>{ //event doesn't firing };// how force to load some data?// GetItemAt doesn't loads any datavar row0 = virtualQuery.GetItemAt(0);var row1 = virtualQuery.GetItemAt(1);var row2 = virtualQuery.GetItemAt(2);Hi,
I am using RadMaskedNumericInput control for Percent input. I have decimal datatype property bound to the control. When i try to update value in control as number 55, it updates the background property as "0.55".
<telerik:RadMaskedNumericInput x:Name="uxPercentToPay" Grid.Row="6" Grid.Column="1" Margin="2,3" Width="120" Style="{StaticResource RadMaskedNumericInputStyle}" Validation.ErrorTemplate="{x:Null}" UpdateValueEvent="PropertyChanged" AutoFillNumberGroupSeparators="False" MaskedInput:MaskedInputExtensions.Maximum="100"MaskedInput:MaskedInputExtensions.Minimum="0" Mask="p2.2" Placeholder=" " AutoFillZeros="True"Value="{Binding PercentToPay,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" MaskedInput:MaskedInputExtensions.IsEditorTabStop="True"/>Background property:
public decimal PercentToPay { get { return _percentToPay; } set { if (_percentToPay == value) { return; } _percentToPay = value; RaisePropertyChanged(() => PercentToPay); } }
Please let me know, what could be the possible miss out here.
Thanks in Advance,
Sagar

Hey all.
We currently have a data grid which we allow the user to drop a list of files onto (from file explorer, for example). We would like to deny the drop if there are invalid files in the list, but I can't see how to do that with the GridView (the TreeView seems to have a much richer drag/drop implementation).
Could I please have some guidance, as I'm at a bit of a loss.
Thanks.
I am using the TreeListView on an app that is used on a Touch Screen device. I am getting some odd lockups. Is there anything I need to know or consider when using a touch screen computer.
I'm using your Windows8Touch theme and it is a windows 8 OS.
Hi there,
I am experiencing an intermittent InvalidOperationException when attempting to show the backstage of a RadRibbonView for the second or subsequent time.
The cause seems to be that the backstage control has not been properly removed from the BackstageAdorner to which it was originally added.
Unfortunately, all of the functionality is either private or internal so it does not appear as though there is any way I can code around this.
Any suggestions would be greatly appreciated.
Thanks.
Here is the call stack related to the error. (since .txt attachments aren't allowed?)
PresentationFramework.dll!System.Windows.FrameworkElement.ChangeLogicalParent(System.Windows.DependencyObject newParent) Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.AddLogicalChild(object child) Unknown
> Telerik.Windows.Controls.RibbonView.dll!Telerik.Windows.Controls.RibbonView.BackstageAdorner.BackstageAdorner(System.Windows.FrameworkElement adornedElement, Telerik.Windows.Controls.RadRibbonBackstage backstage, double topOffset) Line 30 C#
Telerik.Windows.Controls.RibbonView.dll!Telerik.Windows.Controls.RadRibbonView.CreateBackstageAdorner() Line 1419 C#
Telerik.Windows.Controls.RibbonView.dll!Telerik.Windows.Controls.RadRibbonView.ShowBackstage() Line 2536 C#
Telerik.Windows.Controls.RibbonView.dll!Telerik.Windows.Controls.RadRibbonView.ToggleIsBackstageOpen() Line 2655 C#
Telerik.Windows.Controls.RibbonView.dll!Telerik.Windows.Controls.RadRibbonView.OnIsBackstageOpenChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e) Line 1960 C#
WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs e) Unknown
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs args) Unknown
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex entryIndex, System.Windows.DependencyProperty dp, System.Windows.PropertyMetadata metadata, System.Windows.EffectiveValueEntry oldEntry, ref System.Windows.EffectiveValueEntry newEntry, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType) Unknown
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty dp, object value, System.Windows.PropertyMetadata metadata, bool coerceWithDeferredReference, bool coerceWithCurrentValue, System.Windows.OperationType operationType, bool isInternal) Unknown
WindowsBase.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty dp, object value) Unknown
Telerik.Windows.Controls.RibbonView.dll!Telerik.Windows.Controls.RadRibbonView.IsBackstageOpen.set(bool value) Line 667 C#
Telerik.Windows.Controls.RibbonView.dll!Telerik.Windows.Controls.RadRibbonView.AppButtonMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) Line 1258 C#
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown
PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args, System.Windows.RoutedEvent newEvent) Unknown
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args) Unknown
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() Unknown
PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport) Unknown
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel) Unknown
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Unknown
WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Unknown
PresentationFramework.dll!System.Windows.Application.Run() Unknown
ocontrol.exe!TracRite.Optimum.App.Main() C#
How do I add tooltip to DataFormDataField. I have tried:
Tooltip = " "
telerik:RadToolTipService.ToolTipContent=" "
but none of them are working on DataFormDataField.
<telerikGrid:RadGridView AutoGenerateColumns="False" Grid.Row="3"> <telerikGrid:RadGridView.Columns> <telerikGrid:GridViewDataColumn Header="Name" Width="*" /> </telerikGrid:RadGridView.Columns></telerikGrid:RadGridView><ListView Grid.Row="1" ItemsSource="{Binding Selections}"> <ListView.ItemTemplate> <DataTemplate> <StackPanel> <DataGrid AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTextColumn Header="name" Width="*" /> </DataGrid.Columns> </DataGrid> <telerikGrid:RadGridView AutoGenerateColumns="False"> <telerikGrid:RadGridView.Columns> <telerikGrid:GridViewDataColumn Header="Name" Width="*" /> </telerikGrid:RadGridView.Columns> </telerikGrid:RadGridView> </StackPanel> </DataTemplate> </ListView.ItemTemplate></ListView>