Issue with RadDataForm navigation buttons

5 posts, 0 answers
  1. Steven
    Steven avatar
    10 posts
    Member since:
    Apr 2011

    Posted 03 Dec 2012 Link to this post

    Hello,

    I have a RadDataForm synchronised with a RadGridView. The navigation buttons work perfectly when I have not grouped the grid by any of the columns. As soon as I do, the navigation buttons seem to get a bit confused, whereby sometimes one or more of the buttons might be disabed e.g. the move-current-to-next button is disabled when there are still heaps of subsquent records).

    Remove the grouping on the GridView and everything works fine once again.

    Not sure if this has anything to do with the IComparable implementation I've done for the CollectionViewSource ??
    I've basically bound my GridView to a CollectionViewSource which is defined in XAML as follows:
    <CollectionViewSource x:Name="cvs" Source="{Binding PackagedCosts}">
        <CollectionViewSource.SortDescriptions>
            <scm:SortDescription Direction="Ascending" />
        </CollectionViewSource.SortDescriptions>
    </CollectionViewSource>

    PackagedCosts is an ObservableCollection of type FlattenedPackageCost, which has a IComparable.CompareTo defined as follows:
    public DateTime StartDate { get; set; }
    public DateTime EndDate { get; set; }
    public string ParentName { get; set; }
     
    internal string Compare
    {
        get { return string.Join(" ", new[] {ParentName, StartDate.ToString("yyyyMMdd"), EndDate.ToString("yyyyMMdd")}); }
    }
     
    public int CompareTo(object obj)
    {
        var advertPackagedCost = obj as FlattenedPackagedCost;
        return advertPackagedCost != null ? String.CompareOrdinal(Compare, advertPackagedCost.Compare) : 0;
    }

    The gridview is grouped by ParentName.

    Kind regards,
    Steve

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 04 Dec 2012 Link to this post

    Hi Steven,

    I think I managed to reproduce the issue even on our demos and it is not related to the implementation of IComparable. Could you try this demo to confirm whether it is the same one? (I have reproduced it by editing a Salary for a particular person so that there are two item with same value and group by Person).
    Thank you for your cooperation. 

    Kind regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Steven
    Steven avatar
    10 posts
    Member since:
    Apr 2011

    Posted 04 Dec 2012 Link to this post

    Thanks for the response Maya.

    The demo is one that I had looked at and it does exactly mimic my scenario, however, I can't reproduce the problem in the specified demo (possibly due to there being no grouping that will have more than 1 record in a group, which you did mention you modified and managed to reproduce the issue). Please let me know if this is not the confirmation you were after??

    Kind regards,
    Steve.

  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 05 Dec 2012 Link to this post

    Hi Steven,

    Indeed, this is most probably the exact same issue. Thank you a lot for the cooperation. I will investigate it and write you back as soon as I have more information on it.  

    Kind regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 07 Dec 2012 Link to this post

    Hi Steven,

    I resolved the issue and the fix will be available in our internal build coming the next week.
    Thank you for the cooperation. I have updated your telerik points.

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner