Telerik Forums
UI for WPF Forum
1 answer
181 views
Hi Telerik,

We have the latest WPF library - as the project is progressing we have identified elements that we'd like to 'wrap' in busy indicator display.

When just adding the control, we are confronted with the need for code to be executed in background worker thread.

When code had been modified to be executed through the background worker, our code fails as the background thread modifies an ObservableCollection that a control relies on. .Net advices the use of Dispatcher.

However, if using the Dispatcher, I should 'go through' the control and ask it to modify the underlying collection - and that sort of violates the whole idea of MVVM.

I'm sure there's some brilliance hidden for me somewhere :) - can you enlighten me as to the recommended way of using BusyIndicator with MVVM?

Thanks,

Anders, Denmark.
Konstantina
Telerik team
 answered on 22 Aug 2011
1 answer
241 views
On this page, there is a note that states "If you use DataItemCollection as data source, the RadGridView will automatically synchronize the SortDescriptors of the source with its own ones." There is nothing describing how to instantiate a DataItemCollection, the constructor is internal, and there are very few examples of DataItemCollection ever being used, but it seems like it would help with my current scenario.

The reason for my wanting to use DataItemCollection came from a problem that I saw with maintaining selectability in the RadGridView. I have a class derived from ObservableCollection containing a property of type ListCollectionView, with SortDescriptions defined. The collection view is applied to the grid's ItemsSource. This is my problem scenario:
  1. I manually add a row to the grid view, through a button, by calling ListCollectionView.Add().
  2. I fill out the data in the cells and press enter.
  3. The CommitEdit() handling executes.
  4. Sorting is executed on the collection view.
    • On the ListCollectionView.CurrentChanging event, the collection view has its CurrentItem set to the edited row item.
    • On the ListCollectionView.CurrentChanged event, the collection view has its CurrentItem set to null!

I had tried creating a custom KeyboardCommandProvider, where I set only the CommitEdit and SelectCurrentItem commands, but that didn't make a difference (the commit still causes the unwanted chain of events).

This all works as intended if I remove the SortDescriptions from the collection view but I need them. How can I resolve this? Would using a DataItemCollection instead of a ListCollectionView help me in any way?

I am using Q1 of the WPF controls (version 2011.1.419.40).
Dimitrina
Telerik team
 answered on 22 Aug 2011
0 answers
56 views
Hi,

I want to know on how to show information about a date in the RadGridView when it is selected on the RadCalendar.  What I wanted to know is that when you click on a certain day on the RadCalendar, it will then appear on my RadGrid. Thanks.
Yana
Top achievements
Rank 1
 asked on 22 Aug 2011
1 answer
115 views
I am getting an error which appears to be similar to this one:
http://www.telerik.com/community/forums/wpf/general-discussions/system-web-assembly-error.aspx

I have a WPF app targeted to .NET 4 Client Profile, and it is referencing a view models namespace which is populating a BulletGraph QualitativeRangeCollection.  This project is referenced with  Telerik.Windows.Controls, .Controls.DataVisualization, and Windows.Data from RadControls for WPF Q2 2011.   On build I am getting this error:

The referenced assembly "C:\Development\DHS\DHSDashboardService\DHSDashboardViewModels\bin\DHSDashboardViewModels.dll" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
Rossen Hristov
Telerik team
 answered on 22 Aug 2011
1 answer
105 views
Hi,
I have a page with RadRibbonBar at top and below RadDocking. Each Rad Ribbon bar tabs have few buttons like "View All", "Add new", "Edit Selected Item" & "Delete Selected Item".
When user press "View All" button, I create a new RadPane dynamically and add it to RadPaneGroup. Now I have following requirements to accomplish.
1. When user again press View All then just make then pane Docked and selected.
2. When user press Edit button and its relevant "View All Pane" is selected (i.e. has focus) then open a edit dialog. If its relevant "view all pane" is not selected (i.e. has focus) then don't do anything.
3. Same with Delete button as Edit button.

Now the problem is that if user Float the RadPane then it is removed form RadPaneGroup (i.e. its items count decreases) so I don't know how can I see that right now which RadPane has focus.
Kindly note that I am creating RadPane dynamically i.e. there is no fix number of RadPanes.
Kindly help me how can I do that?
Konstantina
Telerik team
 answered on 22 Aug 2011
1 answer
109 views
Hi all
I am using latest hotfix version of radcontrols. following error occured as i can not use radpane. how can i supress this error?

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.Docking
  StackTrace:
       at Telerik.Windows.Controls.RadDocking.SelectActivePane(RadPane radPane) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:line 332
       at Telerik.Windows.Controls.Docking.PaneGroupBase.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Development\Controls\Docking\Docking\Parts\PaneGroupBase.cs:line 227
       at System.Windows.UIElement.OnGotKeyboardFocusThunk(Object sender, KeyboardFocusChangedEventArgs e)
       at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
       at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
       at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
       at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
       at System.Windows.UIElement.Focus()
       at Telerik.Windows.Controls.Docking.PaneGroupBase.OnMouseLeftButtonDown(Object sender, RoutedEventArgs e) in c:\TB\117\WPF_Scrum\Current_HotFix\Sources\Development\Controls\Docking\Docking\Parts\PaneGroupBase.cs:line 392
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       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.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       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)
  InnerException:
Konstantina
Telerik team
 answered on 22 Aug 2011
1 answer
368 views
Hello, I am trying to put a gridfooter on the bottom part of the grid. How can I do that? and also, on that grid, i'd like to show the total number of duration based on the Duration row on my grid. Can you please attach an example that I could follow? Thanks.
Vanya Pavlova
Telerik team
 answered on 22 Aug 2011
2 answers
139 views
Hi there,

I'm using RadScheduler, and other RadControls, on development in the my WPF software. However, i encountered some problems:
I try change CultureInfo for pt-BR and the properties on RadScheduler don't change languages. But when i changed for "en" or "it", the properties is changed with sucessfully.

Can you help me?

Thanks. Sorry for bad english.
cayo fontana
Top achievements
Rank 1
 answered on 19 Aug 2011
1 answer
212 views
Hi,
I am Naresh Mesineni,
I have some doubt....How to strike out of a row.After data binding based on Active column value it has to be strike out with red color.

It is helpful provides sample code..

Thanks ad Regards
Naresh Mesineni
Ivan Ivanov
Telerik team
 answered on 19 Aug 2011
9 answers
327 views
Hi,

I implemented my own paste handling. Therefore I set the property RadGridView.ClipboardPasteMode to GridViewClipboardPasteMode.None. This worked perfectly for version Q3 2010. Now I update to Q2 2011. With this version my handlers of the command ApplicationCommands.Paste are not invoked any more. I noticed that now the method GridViewDataControl.PasteCanExecute contains the statemente: e.Handled = true. I think this does not make sense for GridViewClipboardPasteMode.None.

Is this a known issue? Will it be fixed? Is there a workaround?

Best regards

Uli

Nedyalko Nikolov
Telerik team
 answered on 19 Aug 2011
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?