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:
PackagedCosts is an ObservableCollection of type FlattenedPackageCost, which has a IComparable.CompareTo defined as follows:
The gridview is grouped by ParentName.
Kind regards,
Steve
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