Telerik Forums
UI for WPF Forum
5 answers
120 views
Hello,

I have a class which implements your SL IPagedCollectionView interface, and largely based my code on what you've done in the Endless Paging example.

One thing I noticed, is that on any page change, both in your sample code and in my code, GetEnumerator is called more than once on a page change. This is pretty detrimental if I'm making several calls to the db for my data when I only need 1.

Been trying to step through with the debugger and cannot determine what's causing the problem.


Rossen Hristov
Telerik team
 answered on 01 Dec 2011
13 answers
403 views
In the hierarchical grid below, I have a self-referencial table that has the hieratchical data.
I cannot get the nested grid to display the same row colours as the outhermost nested grid.
I am trying to use the RowLoaded event to colour the rows, but it does not fire for the innermost
nested grids.






void
RadGridView1_RowLoaded(object sender, RowLoadedEventArgs e)
   {
       GridViewRow viewRow = e.Row as GridViewRow;
       DataRow row = e.DataElement as DataRow;
         
       //Employees employee = e.DataElement as Employees;
       if (row != null && row["ID"] != null)
       {
           long ID = (long)row["ID"];
           viewRow.IsExpandable = this.HasSubordinates(ID);
           if (row["Status"].ToString().Trim() == string.Empty)
           {
               viewRow.Background = Brushes.Turquoise;
           }
           else
           {
               viewRow.Background = Brushes.Red;
           }
       }
   }

 

 

 



 

 

 

<telerik:RadGridView x:Name="RadGridView1" RowLoaded="RadGridView1_RowLoaded" DataLoading="RadGridView1_DataLoading"  Grid.ColumnSpan="2"  LoadingRowDetails="RadGridView1_LoadingRowDetails"  
                   ColumnWidth="*" ItemsSource="{Binding TableData}"  
                   GridLinesVisibility="Horizontal" 
                   CanUserFreezeColumns="False" IsReadOnly="True" AutoGenerateColumns="False" >
      <telerik:RadGridView.Columns>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding StepName}" />
          <telerik:GridViewDataColumn DataMemberBinding="{Binding StepType}" />
          <telerik:GridViewDataColumn DataMemberBinding="{Binding TotalTime}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding Status}" />
          <telerik:GridViewDataColumn DataMemberBinding="{Binding StartTime}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding StopTime}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding ErrorCode}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding ErrorMessage}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding ErrorOccurred}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding ReportText}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding Value}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding ComparisonType}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding Limits}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding Units}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}"/>
          <telerik:GridViewDataColumn DataMemberBinding="{Binding PID}"/>
      </telerik:RadGridView.Columns>
      <telerik:RadGridView.ChildTableDefinitions>
          <telerik:GridViewTableDefinition>
              <telerik:GridViewTableDefinition.Relation>
                  <telerik:TableRelation IsSelfReference="True">
                      <telerik:TableRelation.FieldNames>
                          <telerik:FieldDescriptorNamePair 
                          ParentFieldDescriptorName="ID" 
                          ChildFieldDescriptorName="PID"/>
                      </telerik:TableRelation.FieldNames>
                  </telerik:TableRelation>
              </telerik:GridViewTableDefinition.Relation>
          </telerik:GridViewTableDefinition>
      </telerik:RadGridView.ChildTableDefinitions>
  </telerik:RadGridView>
Maya
Telerik team
 answered on 01 Dec 2011
1 answer
164 views
I have a very simple  raddatepicker in a telerik radwindow. when i select the calendar icon, the drop down calendar appears in the top/left corner of the screen. my raddatepicker is:

<telerik:RadDatePicker Grid.Row="1" Grid.Column="1" DateSelectionMode="Day" InputMode="DatePicker"/>


why is this happening?

Ivo
Telerik team
 answered on 30 Nov 2011
1 answer
108 views
Hi everyone! I am using RadRichTextBox as a WordProcessor. I want to add a TextBlock into de RTB to let the user type data into it but, this processor is just to make a LayOut of a report. Later in another module of my system I want to read the content of a previous saved report and seek for the TextBlock, the user will enter date into a Prompt and the value of TextBlock will change. I want to save the report with OpenXML format (To make images portables)... so I think the TextBlock will be dismissed into the Export to Docx. My question is, what would happen if I save the report into OpenXML format, then in the other module I Import this report, then I serialize the RadDocument and seek for the TextBock... is this going to work?
Iva Toteva
Telerik team
 answered on 30 Nov 2011
2 answers
104 views
Is it possible to add a trigger on the IsExpanded property?
I want to set the background color of expanded rows to a specific color.

Regards,
Sacha
Top achievements
Rank 1
 answered on 30 Nov 2011
4 answers
160 views
Hi telerik,

I wish to handle the event that the user clicks somewhere in the tree where there are no items.

I would have thought that the MouseDown fired but apparently it doesn't.

Do you have any advice on what to do?

Thanks,

Anders, Denmark
Anders
Top achievements
Rank 1
 answered on 30 Nov 2011
3 answers
120 views
Hi all,

I've been trying to configure the radchart to show a bar chart where each bar is associated to a month in the year. The configuration I've been using is manual, this is, the XAxis AutoRange = false and then IsDateTime is set to true and minValue, maxValue, Step and LabelStep is configured manually.

I've seen displaying problems in the line exposed in other posts and derived from the fact that the "Step" is not constant between months. Among these problems I can tell some bars displayed with an x-axis offset (not centered) or very thin bars (which is not correct as there is only one series and there is plenty space left blank). 

My question is about the workaround I've used to make this work: Categorical charts. Instead of making the RadChart working directly with dates, I opted by this configuration:

- XAxis AutoRange is set to TRUE
- IsDateTime is set to FALSE
- The ItemMapping in the XAxis is set to XCategory and linked to a property of my bussiness object that contains a string representing the month (Jan, Feb and so on).

Using this configuration shows a chart where the bars are correctly aligned and the width is as expected (they use as much space as they can). I'd like to know if this is a good solution or there is any other more suitable. 

In my opinion, RadChart management of sources where the XAxis is composed by "OADates" doesn't work as well as it could, and an example of this is the situation I just exposed. I wonder if you are working on solving this kind of issues or we should wait until the new ChartView control is available for production usage.

Best regards,

Pablo.
Ves
Telerik team
 answered on 30 Nov 2011
0 answers
152 views
I want to use element "RadComboBox1" element in code. How can i do that.
I try at Q3 2011 WPF 4.0
var gridView= RadGridView1.Columns[0].CellEditTemplate.FindName("RadComboBox1", RadGridView1);
but i get "This operation is valid only on elements that have this template applied" error.
<telerik:RadGridView Name="RadGridView1" AutoGenerateColumns="False" >
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="State" DataMemberBinding="{Binding Path=State}">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding State}" />
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
            <telerik:GridViewDataColumn.CellEditTemplate>
                <DataTemplate>
                    <telerik:RadComboBox x:Name="RadComboBox1" DisplayMemberPath = "State" SelectedIndex="1" SelectedValuePath = "Id" SelectedValue="{Binding Path=State}"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellEditTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>
thanks
Murat
Top achievements
Rank 1
 asked on 30 Nov 2011
7 answers
159 views

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Data
  StackTrace:
       at Telerik.Windows.Data.DataItemCollection.<SetItemsSource>b__3(NotifyCollectionChangedEventArgs c) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 721
       at Telerik.Windows.Data.DataItemCollection.<>c__DisplayClass18.<BindCollections>b__15(NotifyCollectionChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 838
       at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\Synchronization\ObservableCollectionManager.cs:line 97
       at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) in c:\TB\102\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:\TB\102\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.ComponentModel.SortDescriptionCollection.OnCollectionChanged(NotifyCollectionChangedAction action)
       at System.ComponentModel.SortDescriptionCollection.ClearItems()
       at System.Collections.ObjectModel.Collection`1.Clear()
       at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\CollectionHelper.cs:line 437
       at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target) in c:\TB\102\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:\TB\102\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:\TB\102\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:\TB\102\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:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 149
       at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 91
       at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
       at Telerik.Windows.Data.RadObservableCollection`1.ClearItems() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\RadObservableCollection.cs:line 240
       at Telerik.Windows.Data.ObservableItemCollection`1.ClearItems() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\ObservableItemCollection.cs:line 82
       at System.Collections.ObjectModel.Collection`1.Clear()
       at Telerik.Windows.Data.DataItemCollection.ClearLocalDescriptors() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 165
       at Telerik.Windows.Data.DataItemCollection.set_CollectionView(QueryableCollectionView value) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 97
       at Telerik.Windows.Data.DataItemCollection.ClearItemsSource() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\DataItemCollection.cs:line 937
       at Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass18.<Bind>b__17() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3644
       at Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\CursorManager.cs:line 16
       at Telerik.Windows.Controls.GridView.GridViewDataControl.Bind(Object newValue) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3620
       at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3274
       at Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\DataControl.cs:line 143
       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.InvalidateTreeDependentProperty(TreeChangeInfo info, DependencyObject d, FrameworkObject& fo, DependencyProperty dp, FrameworkPropertyMetadata fMetadata, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent)
       at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(TreeChangeInfo info, FrameworkElement fe, FrameworkContentElement fce, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent)
       at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent)
       at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
       at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at MS.Internal.PrePostDescendentsWalker`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 MS.Internal.PrePostDescendentsWalker`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 MS.Internal.PrePostDescendentsWalker`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.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
       at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)
       at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)
       at System.Windows.Media.Visual.RemoveVisualChild(Visual child)
       at System.Windows.FrameworkElement.set_TemplateChild(UIElement value)
       at System.Windows.StyleHelper.ClearGeneratedSubTree(HybridDictionary[] instanceData, FrameworkElement feContainer, FrameworkContentElement fceContainer, FrameworkTemplate oldFrameworkTemplate)
       at System.Windows.StyleHelper.DoTemplateInvalidations(FrameworkElement feContainer, FrameworkTemplate oldFrameworkTemplate)
       at System.Windows.Controls.ContentPresenter.OnTemplateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       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.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.Controls.ContentPresenter.EnsureTemplate()
       at System.Windows.Controls.ContentPresenter.OnPreApplyTemplate()
       at System.Windows.FrameworkElement.ApplyTemplate()
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       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.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(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.Window.ShowHelper(Object booleanBox)
       at System.Windows.Window.Show()
       at System.Windows.Window.ShowDialog()
  InnerException:
Vera
Telerik team
 answered on 30 Nov 2011
5 answers
344 views
Hello,

I have a WCF service operation that I use to get a list of customers. The service operation in question accepts a beginning and an end. It returns the data requested and the total count of results (i.e number of total customers).

My Questions:
A) How can I 'hook on' to RadDataPager so it uses the service when it needs to get data for a specific range/page? I.e Stream data when needed.
B) How can I get RadDataPager to shows the total items, even though the data source will only contain items for the current page. 

I would REALLY appreciate it, if you could show me how to pull this off with a quick WPF sample application. I have found a Silverlight one, but it doesn't seem to be working.

Thanks!
Rossen Hristov
Telerik team
 answered on 30 Nov 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?