Telerik Forums
UI for WPF Forum
2 answers
155 views
I have created a custom popup user control. This control covers the entire application with a gray semi-transparent overlay with a message in the middle. 

I add the control like this which makes it the last control in the grid and putting it on top of all other objects.
Grid mainGrid = (Grid)App.Current.MainWindow.Content;
mainGrid.Children.Insert(mainGrid.Children.Count, this);

I have a docking control in this grid and as long as everything is docked the overlay works great. However, as soon as I pull one of the RadPanes into a separate ToolWindow that tool window is always on top of my overlay user control. Is there anyway to do an overlay that would be on top of the ToolWindow as well?

Dev
Top achievements
Rank 1
 answered on 04 Jun 2012
1 answer
511 views
I have a project where I programmatically create and add RadPanes to a RadDocking control. When the user closes the RadPane it doesn't get garbage collected.

I'm using Redgate's ANTS Memory Profiler to confirm this, and I can see RadDocking control maintains an array of EffectiveValueEntrys which stop the GC collecting the RadPane.

I've seen this thread : http://www.telerik.com/community/forums/wpf/docking/why-not-dispose-of-radpanes-memory-leak-issue.aspx  and have implemented the solution (RemoveFromParent and e.Handled = true), but this still doesn't solve the problem (it does solve another issue we were having so I still need that code in there).

The RadPane is created

var pane = new RadPane();
 
var paneGroup = new RadPaneGroup();
paneGroup.Items.Add(pane);
 
var splitContainer = new RadSplitContainer();
splitContainer.Items.Add(paneGroup);
 
this.dockingControl.Items.Add(splitContainer);
pane.MakeFloatingDockable();

I've attached a screenshot of the ANTS profiler Retention Graph for the RadPane. I'm unable to attach a zip file containing a sample project which shows the problem (although you'll need to be running a memory profiler to see the bug), as I can only upload (gif, jpg, jpeg or png) but I have it ready to upload if there is an alternative upload facility.

Could you please advise me on how to fix this problem. Is this a known bug, or am I simply creating/destroying the pane incorrectly?

Kind regards,

Rich Keenan
Adam Marshall
Top achievements
Rank 1
 answered on 04 Jun 2012
1 answer
146 views
Hi,

I programmed a custom annotation insertion and, I have an issue when custom annotation's prefix are exported. Here is the fragment of code to make the custom annotation:
Public Class NovoBookMarkRangeStart
    Inherits FieldRangeStartBase
  
    Private m_Name As String
    Private m_TypeCase As Integer
    Private m_BookFormat As String
  
    <XamlSerializable()> _
    Public Property BookFormat As String
        Get
            Return m_BookFormat
        End Get
        Set(value As String)
            m_BookFormat = value
        End Set
    End Property
  
    <XamlSerializable()> _
    Public Property Name() As String
        Get
            Return m_Name
        End Get
        Set(value As String)
            m_Name = value
        End Set
    End Property
  
    <XamlSerializable()> _
    Public Property TypeCase() As Integer
        Get
            Return m_TypeCase
        End Get
        Set(value As Integer)
            m_TypeCase = value
        End Set
    End Property
  
      
  
    Public Sub New()
    End Sub
  
    Public Sub New(name As String, TypeCase As Integer, Bookformat As String)
        Me.TypeCase = TypeCase
        Me.Name = name
        Me.BookFormat = Bookformat
    End Sub

Here is the code to put the annotation in the document :
Private Sub Wpf_NewBookMark(ID As Integer,  TypeCase As Integer, BookFormat As String) Handles Wpf.NewBookMark
         
       Dim StartRange As New NovoBookMarkRangeStart(ID.ToString, TypeCase, BookFormat)
       Dim EndRange As New NovoBookMarkRangeEnd()
       'Caret Position
       Dim S As New DocumentPosition(Me.editor.Document.CaretPosition)
       Dim E As New DocumentPosition(Me.editor.Document)
       EndRange.PairWithStart(StartRange)
       'Custom Span
       Dim BookMarkSpan As New Span("{" & Id.ToString() & "}")
       S.AnchorToCurrentBoxIndex()
       editor.InsertInline(StartRange)
       editor.InsertInline(BookMarkSpan)
       editor.InsertInline(EndRange)
       S.RestorePositionFromBoxIndex()
       editor.UpdateEditorLayout()
         
   End Sub

So, when I save the document under a .XAML format, the section with the custom annotation does not save the TypeCase value but put the prefix and, the BookFormat prefix is not there at all. On the other hand, the Name prefix is with the good value. Here is a sample fragment :

<t:Section PageMargin="96,96,96,96" PageSize="816,1056">
    <t:Paragraph LineSpacing="1" StyleName="Normal">
      <custom1:NovoBookMarkRangeStart AnnotationID="1" Name="5" TypeCase="0" />
      <t:Span Text="{}{Patient.PostalCode}" />
      <custom1:NovoBookMarkRangeEnd AnnotationID="1" />
    </t:Paragraph>
  </t:Section>

So, can you find why the BookFormat prefix and value are not present and, why the the TypeCase value is the wrong one?

Thank a lot,

Patrick
Iva Toteva
Telerik team
 answered on 04 Jun 2012
1 answer
97 views

I find that when I decorate a RadRibbonTab with a ContextualGroupName, elements in the tab no longer resize. Is there a known issue with Contextual Tabs that prevents them from resizing as normal RadRibbonTabs do?
Tina Stancheva
Telerik team
 answered on 04 Jun 2012
1 answer
187 views
Hi,

My WPF application uses an SQlite database which exposes is functionality by an OpenAccess ORM Domain Model, and is then wrapped in an MVVM schema. One of the tables in the database is called ValidUsers, I have created a Metadata class called ValidUsersMetadata as per the guidance in the OpenAccess documentation and is shown below:

using System;
using System.Linq;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
 
namespace VisorDataModel
{
    [MetadataTypeAttribute(typeof(ValidUser.ValidUserMetadata))]
    public partial class ValidUser : IEditableObject
    {
 
        internal sealed class ValidUserMetadata
        {
 
            public ValidUserMetadata()
            {
            }
 
            [Required(ErrorMessage = "User ID is required")]
            public int UserID
            {
                get;
                set;
            }
 
           [Required(ErrorMessage = "User Name is required.")]
           [StringLength(6,ErrorMessage="User name must be at least 6 characters")]
           public string UserName
            {
                get;
                set;
            }
 
           [Required(ErrorMessage = "Password is required.")]
           [StringLength(6, ErrorMessage = "Password must be at least 6 characters")]
           public string UserPassword
            {
                get;
                set;
            }
 
           [Required(ErrorMessage = "User Class is required.")]
           public int UserClass
            {
                get;
                set;
            }
 
        }
    }
}

The base ValidUser definition is in the class VisorDataModel which is generated by the OpenAccess Domain Model wizard.

The rest of the MVVM definitions for ValidUsers are shown below:
using System;
using System.Collections.Generic;
using System.Linq;
 
namespace VisorDataModel
{
    public interface IValidUsersModel
    {
        IEnumerable<ValidUser> LoadValidUsers();
        IEnumerable<UserClass> LoadUserClasses();
        ValidUser NewValidUser();
        void AddValidUser(ValidUser validUser);
        void DeleteValidUser(ValidUser validUser);
        void SaveChanges();
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
 
namespace VisorDataModel
{
 
    /// <summary>
    /// Represents a source of ValidUsers
    /// </summary>
    public class ValidUsersModel : IValidUsersModel
    {
        private EntitiesModel dbContext = new EntitiesModel();
 
        public IEnumerable<ValidUser> LoadValidUsers()
        {
            return dbContext.ValidUsers.ToList();
        }
 
        public IEnumerable<UserClass> LoadUserClasses()
        {
            return dbContext.UserClasses.ToList();
        }
 
        public ValidUser NewValidUser()
        {
            ValidUser newValidUser = new ValidUser { UserName = "New User", UserPassword = "New Password", UserClass = 0 };
 
            int newUserId = 0;
            try
            {
                newUserId = (from vu in dbContext.ValidUsers
                             select (vu.UserID)).Max() +1;
            }
            catch
            {
                newUserId = 0;
            }
            newValidUser.UserID = newUserId;
            return newValidUser;
       }
        public void AddValidUser(ValidUser validUser)
        {
            dbContext.Add(validUser);
            dbContext.SaveChanges();
        }
 
        public void DeleteValidUser(ValidUser validUser)
        {
            dbContext.Delete(validUser);
            dbContext.SaveChanges();
        }
 
        public void SaveChanges()
        {
            dbContext.SaveChanges();
        }
    }
}
using System;
using System.Linq;
using System.Collections.ObjectModel;
using System.ComponentModel;
 
namespace VisorDataModel
{
    public class ValidUsersViewModel : INotifyPropertyChanged
    {
 
        private readonly IValidUsersModel dataModel;
        private ValidUser _selectedValidUser;
        private DelegateCommand _addValidUserCommand;
        private DelegateCommand _deleteValidUserCommand;
        private DelegateCommand _saveChangesCommand;
        private ObservableCollection<ValidUser> _validUsers;
        private ObservableCollection<UserClass> _userClasses;
        public event PropertyChangedEventHandler PropertyChanged;
        private ObservableCollection<ValidUser> _originalValidUsers;
 
        #region initialisation
        public ValidUsersViewModel()
        {
            this.dataModel = new ValidUsersModel();
        }
        #endregion
 
        public ObservableCollection<ValidUser> ValidUsers
        {
            get
            {
                if (this._validUsers == null)
                {
                    this._validUsers = new ObservableCollection<ValidUser>();
 
                    if (this._originalValidUsers == null)
                    {
                        this._originalValidUsers = this._validUsers;
                    }
 
                    LoadValidUsers();
                }
 
                return this._validUsers;
            }
        }
 
        public ObservableCollection<UserClass> UserClasses
        {
            get
            {
                if (this._userClasses == null)
                {
                    this._userClasses = new ObservableCollection<UserClass>();
                    LoadUserClasses();
                }
                return this._userClasses;
            }
        }
 
        #region SelectValidUser property
        public ValidUser SelectedValidUser
        {
            get
            {
                return _selectedValidUser;
            }
            set
            {
                if (this._selectedValidUser == value)
                    return;
                this._selectedValidUser = value;
                this.OnPropertyChanged("SelectedValidUser");
            }
        }
        #endregion
 
        public DelegateCommand AddValidUserCommand
        {
            get
            {
                if (this._addValidUserCommand == null)
                    this._addValidUserCommand = new DelegateCommand(this.OnAddCommandExecute);
                return _addValidUserCommand;
            }
        }
 
        public DelegateCommand DeleteValidUserCommand
        {
            get
            {
                if (this._deleteValidUserCommand == null)
                    this._deleteValidUserCommand = new DelegateCommand(this.OnDeleteCommandExecute);
                return _deleteValidUserCommand;
            }
        }
 
        public DelegateCommand SaveChangesCommand
        {
            get
            {
                if (this._saveChangesCommand == null)
                    this._saveChangesCommand = new DelegateCommand(this.OnSaveCommandExecute);
                return _saveChangesCommand;
            }
        }
 
        private void LoadValidUsers()
        {
            this._validUsers.Clear();
            foreach (var item in this.dataModel.LoadValidUsers())
            {
                this._validUsers.Add(item);
            }
        }
 
        private void LoadUserClasses()
        {
            this._userClasses.Clear();
            foreach (var item in this.dataModel.LoadUserClasses())
            {
                this._userClasses.Add(item);
            }
        }
 
        private void OnAddCommandExecute(object parameter)
        {
            ValidUser newValidUser = this.dataModel.NewValidUser();
            this.ValidUsers.Add(newValidUser);
            this.SelectedValidUser = newValidUser;
            this.dataModel.AddValidUser(newValidUser);
        }
 
        private void OnDeleteCommandExecute(object parameter)
        {
            if (this.SelectedValidUser != null)
            {
                this.dataModel.DeleteValidUser(this.SelectedValidUser);
                this.ValidUsers.Remove(this.SelectedValidUser);
            }
        }
 
        private void OnSaveCommandExecute(object parameter)
        {
            this.dataModel.SaveChanges();
        }
 
        protected virtual void OnPropertyChanged(string info)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(info));
        }
    }
}



One of the functions of the application is to display/add/delete/edit ValidUser records. This is accomplished by a RadDataGrid and a pop-up RadDataForm. The RadDataForm uses custom fields, one of which is defined as a DataFormComboBoxField.

All of this works fine but I now want to use the DataAnnotations which I have added in the ValidUserMetadata class. So far I have not found how to do this.

Any help gratefully received.

Thanks
Ivan Ivanov
Telerik team
 answered on 04 Jun 2012
2 answers
196 views
Hello all,

I have a case where a 'parent' tab control contains a 'child' tab control in each of its tabs. So we have something like:

PT1 (parent tab 1)
     -> CT1 (child tab 1)
     -> CT2
     -> CT3
PT2 (parent tab 2)
     -> CT4
     -> CT5
     -> CT6 

Say that in Parent Tab 1 (PT1), I select the second child tab (CT2). Then I move to PT2 and select any other child tab. When I return to PT1, I would expect my previous child tab selection (CT2) to be preserved. Instead, the child tab control is 'reset' to no selection.

Is there a property to set so that 'child' user control states such as child controls are preserved when switching between tabs?

My apologies, this question seems awfully complicated for such a simple case... it would be awesome if we could upload some projects to the forum for customer support to try out! :-)

Thanks for your help,

Simon
Simon
Top achievements
Rank 1
 answered on 04 Jun 2012
2 answers
269 views
Hi.

I'm using a grid that has row details. There is a plus sign in the left-most column for the user to click on to expand the row. When the user clicks on a cell in the row, the details expand normally and the row is selected. But when the user just clicks on the plus sign, the row is expanded but the row does not get selected. I've tried various ways to programmatically select the row in the RowDetailsVisibilityChanged event but have been unsuccessful.

Also, the showing of the row details when the user clicks on other cells works OK (RowDetailsVisibilityMode = VisibleWhenSelected) but after a while the rows do not expand anymore and the user must click on the plus sign to expand the row. Not sure if the two issues are related.

I'm relatively new to WPF so apologies if I'm overlooking the obvious.

TIA,

John
John
Top achievements
Rank 1
 answered on 04 Jun 2012
3 answers
164 views
In our application we want to export hierarchical gridview to PDF format. I have seen a telerik demo with simple grid. It is working fine. But my queries are:
1. Is there any similar way to export hierarchical grids to PDF file.
2. How can we extract child gridview control which is defined as Hierarchical template in the parent Gridview? Please provide me some sample code.
Dimitrina
Telerik team
 answered on 04 Jun 2012
3 answers
171 views
Hello,

I have a tree list view that contains a set of hierarchical data.  I have set up a filter to recreate the observable collection to filter out certain items from the tree.  The initial load works fine and the data is presented.  I can recreate the filter just fine.  As soon as the property changed event fires, I get a null reference exception from the tree list view.  I've tried replacing the data source collection with a new collection and I've tried just removing and adding filtered items back to the collection.  Both result in the exception below.

I Don't have a null item in my dataset - though there are some NULLs in the data itself which is fine when the tree is first loaded.

00000e42  mov         dword ptr [ebp+FFFFF734h],eax  

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.GridView
  StackTrace:
       at Telerik.Windows.Controls.TreeListView.TreeListViewRow.UpdateIsExpandable() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 307
       at Telerik.Windows.Controls.TreeListView.TreeListViewRow.OnItemsChanged(Object sender, NotifyCollectionChangedEventArgs e) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 301
       at Telerik.Windows.Controls.TreeListView.TreeListViewRow.OnItemsCollectionChanged(HierarchicalChildCollectionView oldValue, HierarchicalChildCollectionView newValue) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 240
       at Telerik.Windows.Controls.TreeListView.TreeListViewRow.set_Items(HierarchicalChildCollectionView value) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 220
       at Telerik.Windows.Controls.RadTreeListView.InitializeHierarchyProperties(GridViewRowItem gridViewRow, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\RadTreeListView.cs:line 260
       at Telerik.Windows.Controls.GridView.GridViewDataControl.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 7600
       at Telerik.Windows.Controls.RadTreeListView.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\RadTreeListView.cs:line 248
       at Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\BaseItemsControl.cs:line 336
       at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:line 237
       at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2312
       at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertNewContainer(Int32 childIndex, UIElement container) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2206
       at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2366
       at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.GenerateNextChild(IItemContainerGenerator generator, Int32 childIndex) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1530
       at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1228
       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 System.Windows.Controls.TabItem.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
       at System.Windows.UIElement.OnPreviewGotKeyboardFocusThunk(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.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 System.Windows.Controls.TabItem.SetFocus()
       at System.Windows.Controls.TabItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.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)
       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.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at APPLICATION.App.Main() in APPLICATION_PATH\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(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.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Dimitrina
Telerik team
 answered on 04 Jun 2012
5 answers
172 views
How do I use the LastFunction in the AggregateFunctions of a GridViewDataColumn? When I put it in, it only seems to display the string of the underlying datatype of my row, not the value of the column of the last item. Other functions(Sum, min, max) show just fine.

According to the documentation it should work. http://www.telerik.com/help/wpf/gridview-columns-aggregate-functions.html
Dimitrina
Telerik team
 answered on 04 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?