Thank you for the RadGridViewSettings.cs file. Every thing work #1 except when I sort on a GridViewDynamicHyperlinkColumn and save it.
See error message in attachement.
Error at this line (setting.PropertyName = ((GridViewDataColumn)d.Column).GetDataMemberName();) :
Any idea ?
See error message in attachement.
Error at this line (setting.PropertyName = ((GridViewDataColumn)d.Column).GetDataMemberName();) :
foreach (ColumnSortDescriptor d in grid.SortDescriptors.OfType<
ColumnSortDescriptor
>())
{
SortSetting setting = new SortSetting();
setting.PropertyName = ((GridViewDataColumn)d.Column).GetDataMemberName();
setting.SortDirection = d.SortDirection;
Settings.SortSettings.Add(setting);
}
Any idea ?
{System.InvalidCastException: Impossible d'effectuer un cast de l'objet de type 'Telerik.Windows.Controls.GridViewDynamicHyperlinkColumn' en type 'Telerik.Windows.Controls.GridViewDataColumn'.
à mesespacesclos.RadGridViewSettings.SaveState()
à mesespacesclos.RadGridViewSettings.grid_Unloaded(Object sender, RoutedEventArgs e)
à MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
à MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)}