This is a migrated thread and some comments may be shown as answers.

Issue with RadDataForm navigation buttons

4 Answers 59 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 04 Dec 2012, 03:44 AM
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

4 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 04 Dec 2012, 09:04 AM
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.

0
Steven
Top achievements
Rank 1
answered on 04 Dec 2012, 11:06 PM
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.

0
Maya
Telerik team
answered on 05 Dec 2012, 07:43 AM
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.

0
Maya
Telerik team
answered on 07 Dec 2012, 11:31 AM
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.

Tags
DataForm
Asked by
Steven
Top achievements
Rank 1
Answers by
Maya
Telerik team
Steven
Top achievements
Rank 1
Share this question
or