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

I am displaying a line chart on the screen. It looks great but after exporting to a PNG file, the exported chart does not look anything like the one on the screen. I am disabling the animation as well. Is there anything else I need to be doing to get an exact match?

btw, I was not able to attach the images to show you the differences.

Thanks
Yavor
Telerik team
 answered on 18 Jul 2011
3 answers
94 views
I'm considering the purchase of Q2 2011 specifically for this control as I'm hoping it will take some of the time and effort out of working with hand-coded ObservableCollections to interact with our WCF service.  

I downloaded the trial and it installed fine (other than not installing any of the controls in the VS tool box like it's supposed to).  After dragging the control into the window and trying to do a test build I get "The tag 'RadDataServiceDataSource' does not exist in XML namespace 'http://schemas.telerik.com/2008/xaml/presentation'.".

I'm hoping there is a solution to this problem so I can move on to the next challenge of finding any sort of documentation for this new control.  I'm not looking for generic northwind examples with 10 lines of code-- I'm looking for documentation.

Thanks!

Rossen Hristov
Telerik team
 answered on 18 Jul 2011
1 answer
210 views
Are you able to post an example of how to use LookupPropertyDefinition?


Craig
Maya
Telerik team
 answered on 18 Jul 2011
1 answer
166 views
I would like to know if the Metro theme is not included for my subscription. I have downloaded the WPF Q2 release and only see the default themes such as OfficeBlue,OfficeBlack and Windows 7.

How do I create a project and get the Metro theme to work?
Milan
Telerik team
 answered on 18 Jul 2011
1 answer
296 views
Is there an easy way in in the GridView to hide the cell focus rectangle.

I have a read only GridView that we do not show Lines on at all and the SelectionUnit is set to FullRow and other than the focus rectangle in the cell it looks exactly as we want it to.

I saw some talk on this in the Silverlight Forum back in 2009. It started with a loop through the rows rectangles but that no longer appears to work.
Silverlight Thread

More recently it was suggested that we have to create a custom style or data template to override the default and remove the focus rectangle from that. Is that the case for WPF also?
Maya
Telerik team
 answered on 18 Jul 2011
2 answers
125 views
Is it possible to modify the request that is made?

We have an OData service that is secured using SSL that requires a client certificate to be sent.


Craig
Craig
Top achievements
Rank 1
 answered on 17 Jul 2011
3 answers
358 views
Hi there telerik team,

I'm using the RadRichTextBox with a RtfFormatProvider inside a RadGridView column like this:

<telerikGrid:GridViewDataColumn Header="Notes" Name="colNoteText" IsReadOnly="True" IsFilterable="False" IsGroupable="False" IsSortable="False">
      <telerikGrid:GridViewDataColumn.CellTemplate>
          <DataTemplate>
              <Grid>
                  <telerikDocumentsRtf:RtfDataProvider Name="rtfDataProvider"
                         Rtf="{Binding Path=Note, Mode=TwoWay}"
                         RichTextBox="{Binding ElementName=TextBoxNote}" />
 
                  <telerik:RadRichTextBox Name="TextBoxNote" >
                  </telerik:RadRichTextBox>
              </Grid>
          </DataTemplate>
      </telerikGrid:GridViewDataColumn.CellTemplate>
  </telerikGrid:GridViewDataColumn>

The RTF text is displayed as expected. But when I'm sorting the grid based on other columns where the DataMemberBinding was set, the application is terminated with this exception:

Error: 0 : System.NullReferenceException: Object reference not set to an instance of an object
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.Remove(GeneratorPosition position, Int32 count, Boolean isRecycling) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 288.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IRecyclingItemContainerGenerator.Recycle(GeneratorPosition position, Int32 count) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 626.
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.CleanupRange(IList children, IItemContainerGenerator generator, Int32 startIndex, Int32 count) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:Line 2637.
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.CleanupContainers(Int32 firstViewport, BaseItemsControl itemsControl) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:Line 2366.
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:Line 1193.
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.UIElement.UpdateLayout()
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.UpdateEditorLayout() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs:Line 716.
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnDocumentChanged() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs:Line 448.
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.OnOwnerChanged() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\DocumentPresenterBase.cs:Line 1025.
   at Telerik.Windows.Documents.UI.DocumentPresenterBase.set_Owner(RadRichTextBox value) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\DocumentPresenterBase.cs:Line 117.
   at Telerik.Windows.Controls.RadRichTextBox.InitActiveEditorPresenter() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\RadRichTextBox.cs:Line 2632.
   at Telerik.Windows.Controls.RadRichTextBox.set_Document(RadDocument value) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\RadRichTextBox.cs:Line 818.
   at Telerik.Windows.Documents.FormatProviders.DataProviderBase.UpdateDocument() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\FormatProviders\DataProviderBase.cs:Line 190.
   at Telerik.Windows.Documents.FormatProviders.DataProviderBase.StringPropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\FormatProviders\DataProviderBase.cs:Line 120.
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.FrameworkElement.set_DataContext(Object value)
   at Telerik.Windows.Controls.GridView.DataCellsPresenter.OnItemChanged(Object oldItem, Object newItem) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\DataCellsPresenter.cs:Line 313.
   at Telerik.Windows.Controls.GridView.DataCellsPresenter.set_Item(Object value) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\DataCellsPresenter.cs:Line 301.
   at Telerik.Windows.Controls.GridView.GridViewRowItem.OnItemChanged(Object oldItem, Object newItem) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRowItem.cs:Line 581.
   at Telerik.Windows.Controls.GridView.GridViewRow.OnItemChanged(Object oldItem, Object newItem) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRow.cs:Line 529.
   at Telerik.Windows.Controls.RadRowItem.OnItemChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\RadRowItem.cs:Line 47.
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)
   at System.Windows.DependencyObject.ClearValue(DependencyProperty dp)
   at Telerik.Windows.Controls.GridView.GridViewRowItem.ClearRow(GridViewDataControl owningDataGrid) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRowItem.cs:Line 702.
   at Telerik.Windows.Controls.GridView.GridViewRow.ClearRow(GridViewDataControl owningDataGrid) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRow.cs:Line 1798.
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ClearContainerForItemOverride(DependencyObject element, Object item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:Line 7734.
   at Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.ClearContainerForItem(DependencyObject container, Object item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\BaseItemsControl.cs:Line 264.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.UnlinkContainerFromItem(DependencyObject container, Object item, Boolean isRecycled) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 2265.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.UnlinkContainerFromItem(DependencyObject container, Object item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 2205.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.RecycleRealizedContainer(DependencyObject container, Object item) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 606.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.RecycleAllRealizedContainersInBlock(RealizedItemBlock rib) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 600.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.RecycleAllRealizedContainers() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 583.
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.ReInitializeContainers() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:Line 488.
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ReuseContainersOnReset() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:Line 8364.
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:Line 8338.
   at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\BaseItemsControl.cs:Line 691.
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:Line 665.
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:Line 642.
   at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:Line 1046.
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:Line 33.
   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Line 679.
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Line 824.
   at Telerik.Windows.Data.QueryableCollectionView.RefreshInternal() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Line 771.
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Line 765.
   at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Line 392.
   at Telerik.Windows.Data.QueryableCollectionView.OnSortDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Line 403.
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:Line 143.
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:Line 91.
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:Line 259.
   at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\CollectionHelper.cs:Line 450.
   at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\CollectionHelper.cs:Line 420.
   at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\Synchronization\ObservableCollectionManager.cs:Line 119.
   at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\Synchronization\ObservableCollectionManager.cs:Line 86.
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:Line 33.
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:Line 143.
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:Line 91.
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:Line 259.
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformSorting(GridViewSortingEventArgs sortingArgs) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Sorting.cs:Line 139.
   at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass74.<Sort>b__73() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Sorting.cs:Line 89.
   at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\CursorManager.cs:Line 16.
   at Telerik.Windows.Controls.GridView.GridViewDataControl.Sort(GridViewColumn column, Boolean appendToExisting) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Sorting.cs:Line 79.
   at Telerik.Windows.Controls.GridView.GridViewHeaderCell.RequestSort(Boolean appendToExisting) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewHeaderCell.cs:Line 374.
   at Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnMouseLeftButtonUp(MouseButtonEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewHeaderCell.cs:Line 363.
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(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)
   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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()

Have you seen such problems before?

Regards
Christian Kleinheinz
bernd kopp
Top achievements
Rank 1
 answered on 17 Jul 2011
6 answers
514 views

Dear Support,

I want to Binding to GridView.SelectedItems.Count or other DependencyProperty, but it returns nothing, no error no exception. Please help me how to Binding in telerik:GridViewColumn.Footer.

Other test results:

  • Binding to AggregateFunctions works fine.
  • Binding to GridView.SelectedItems.Count or other DependencyProperty out of the range of GridView works fine.

Code is below:

<telerik:GridViewDataColumn Header="PO Number" DataMemberBinding="{Binding PONUMBER}">
    <telerik:GridViewDataColumn.AggregateFunctions>
        <custom:CountDistinctFunction Caption="Distinct PO Count:" />
    </telerik:GridViewDataColumn.AggregateFunctions>
    <telerik:GridViewDataColumn.Footer>
        <StackPanel Orientation="Vertical" Margin="0">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Selected:" />
                <TextBlock Text="{Binding ElementName=myGridView, Path=SelectedItems.Count}" />
            </StackPanel>
            <telerik:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <TextBlock VerticalAlignment="Center" Text="{Binding Caption}" />
                            <TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" />
                        </StackPanel>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </telerik:AggregateResultsList>
        </StackPanel>
    </telerik:GridViewDataColumn.Footer>
</telerik:GridViewDataColumn>

Thanks for your support.
Wayne
Top achievements
Rank 1
 answered on 17 Jul 2011
2 answers
143 views
I am binding from a column header to some properties on a viewmodel. This binding is set up as shown:

                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.Header>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Label Grid.Row="0">Volume flow</Label>
                            <ComboBox Style="{StaticResource unitGridHeader}" Grid.Row="1" ItemsSource="{Binding Path=UnitVolumeFlow.AvailableUnits}"
                                          SelectedItem="{Binding Path=UnitVolumeFlow.CurrentUnit}" />
                        </Grid>
                    </telerik:GridViewDataColumn.Header>

The header is not populated with data when its shown, I also notice that there is no binding error output from Visual Studio. I've done a little research and I see that the DataContext from the grid is propagated to the DataGridViewColumn.DataContext. It seems like that binding evaluation is ignored entirely. What can cause this behaviour and how can I fix it?

Carsten Jendro
Top achievements
Rank 2
 answered on 17 Jul 2011
0 answers
298 views
Hi,

I'm something of a beginner and have built a WPF window that uses the RadDataForm. Everything works, so I don't have a specific problem, but am looking to see if there is a better solution than the one I've created.

Essentially, I'm creating an ObservableCollection and filling it with one record from the database using LINQ. My problem was that changes made to the OC in the dataform at runtime were not getting written back to the database. After a lot of googling, I have become thouroughly confused on the how to properly set this up, so came up with my own idea. I'm posting the code more as a peer review exercise rather than looking for a fix to an error.

The big question here is: Is there a better approach than the one I used?

AcctInfo.xaml.cs
using System.Linq;
using System.Windows;
using NAPAData;
using System.Collections.ObjectModel;
namespace wpfNAPADashBoard.Pages
{
/// <summary>
/// Interaction logic for AcctInfo.xaml
/// </summary>
public partial class AcctInfo : Window
{
//Make a connection to the database Entity class context.
TAMSdbDataContext db = new TAMSdbDataContext();
//Access the user name saved to the iDictionary as part of the login process.
string uName = (string)App.Current.Properties["UserName"];
//Create an observable collection to bind the raddataform to. The collection is empty at this point.
ObservableCollection<UserDetail> obCol = new ObservableCollection<UserDetail>();
public AcctInfo()
{
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
//upon loading the window - LINQ query to populate the observable collection with a single record from the database
var userDetails =
from ud in db.UserDetails
where ud.UserName == uName
select ud;
foreach (var i in userDetails)
{
obCol.Add(i);
}
//Binds the observable collection to the dataform
AccountInfo.ItemsSource = obCol.ToList();
}
private void RadMenuItem_Click(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
//Used by the RadMenu to close the window popup
this.Close();
}
private void AccountInfo_EditEnded(object sender, Telerik.Windows.Controls.Data.DataForm.EditEndedEventArgs e)
{
//AccountInfo_EditEnded is used to save changes made to the observable collection to the database record using LINQ.
//First perform a LINQ query against the observable collection.
var result = (from o in obCol
select o);
//Now loop through the "result" query.
foreach (var x in result)
{
//LINQ query to pull the matching observable collection record from the database.
var userDetails =
from ud in db.UserDetails
where ud.UserName == uName
select ud;
//Apply the observable collection values to the LINQ query values.
foreach (var i in userDetails)
{
i.FirstName = x.FirstName;
i.LastName = x.LastName;
i.CompanyName = x.CompanyName;
i.Address1 = x.Address1;
i.Address2 = x.Address2;
i.Address3 = x.Address3;
i.City = x.City;
i.Region = x.Region;
i.Country = x.Country;
i.Phone = x.Phone;
i.WebSite = x.WebSite;
i.Email = x.Email;
//Save changes to the database
db.SubmitChanges();
}
}
}
}
}

AcctInfo.xaml
<Window x:Class="wpfNAPADashBoard.Pages.AcctInfo"
        Title="Account Information"
         WindowStartupLocation="CenterScreen"
        Height="419"
        Width="806"
        Loaded="Window_Loaded">
    <Grid>
        <Grid.Resources>
            <DataTemplate x:Key="MyTemplate">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <telerik:DataFormDataField Grid.Row="0" Grid.Column="0" Label="Client ID:" DataMemberBinding="{Binding ClientID, Mode=OneWay}" IsEnabled="False" />
                    <telerik:DataFormDataField Grid.Row="1" Grid.Column="0" Label="Company Name:" DataMemberBinding="{Binding CompanyName, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="2" Grid.Column="0" Label="Address 1:" DataMemberBinding="{Binding Address1, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="3" Grid.Column="0" Label="Address 2:" DataMemberBinding="{Binding Address2, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="4" Grid.Column="0" Label="Address 3:" DataMemberBinding="{Binding Address3, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="5" Grid.Column="0" Label="City:" DataMemberBinding="{Binding City, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="6" Grid.Column="0" Label="State/Region:" DataMemberBinding="{Binding Region, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="7" Grid.Column="0" Label="PostalCode:" DataMemberBinding="{Binding PostalCode, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="8" Grid.Column="0" Label="Country:" DataMemberBinding="{Binding Country, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="0" Grid.Column="1" Label="Company ID:" DataMemberBinding="{Binding CompanyID, Mode=OneWay}" IsEnabled="False" />
                    <telerik:DataFormDataField Grid.Row="1" Grid.Column="1" Label="First Name:" DataMemberBinding="{Binding FirstName, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="2" Grid.Column="1" Label="Last Name:" DataMemberBinding="{Binding LastName, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="3" Grid.Column="1" Label="Email:" DataMemberBinding="{Binding Email, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="4" Grid.Column="1" Label="Phone:" DataMemberBinding="{Binding Phone, Mode=TwoWay}" />
                    <telerik:DataFormDataField Grid.Row="5" Grid.Column="1" Label="Website:" DataMemberBinding="{Binding WebSite, Mode=TwoWay}" />
                     
                     
                </Grid>
            </DataTemplate>
        </Grid.Resources>
 
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <telerik:RadMenu Name="radMenu1"
                         VerticalAlignment="Top"
                         ClickToOpen="True"
                         telerik:StyleManager.Theme="Office_Black"
                         Grid.Row="0">
            <telerik:RadMenuItem Header="Close" Click="RadMenuItem_Click" />
        </telerik:RadMenu>
 
        <telerik:RadDataForm x:Name="AccountInfo"
                             AutoGenerateFields="False"
                             ReadOnlyTemplate="{StaticResource MyTemplate}"
                             EditTemplate="{StaticResource MyTemplate}"
                             Grid.Row="1"
                             telerik:StyleManager.Theme="Office_Black"
                             CommandButtonsVisibility="Cancel,Commit,Edit" EditEnded="AccountInfo_EditEnded" >
             
        </telerik:RadDataForm>
    </Grid>
</Window>

Again, this coding solution works with no problems, but I'm trying learn as I go and am fairly certain my solution is likely not the best one.

Thanks, Mark
visionharvest
Top achievements
Rank 1
 asked on 16 Jul 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?