Esempio n. 1
0
 protected async Task TitleButtonClicked()
 {
     if (Column.IsSorted)
     {
         if (Column.Direction == GridSortDirection.Ascending)
         {
             await GridComponent.GetSortUrl(SortingSettings.ColumnQueryParameterName, Column.Name, SortingSettings.DirectionQueryParameterName,
                                            ((int)GridSortDirection.Descending).ToString(CultureInfo.InvariantCulture));
         }
         else
         {
             if (Column.InitialDirection.HasValue)
             {
                 await GridComponent.GetSortUrl(SortingSettings.ColumnQueryParameterName, Column.Name, SortingSettings.DirectionQueryParameterName,
                                                ((int)GridSortDirection.Ascending).ToString(CultureInfo.InvariantCulture));
             }
             else
             {
                 await GridComponent.GetSortUrl(SortingSettings.ColumnQueryParameterName, SortingSettings.DirectionQueryParameterName);
             }
         }
     }
     else
     {
         await GridComponent.GetSortUrl(SortingSettings.ColumnQueryParameterName, Column.Name, SortingSettings.DirectionQueryParameterName,
                                        ((int)GridSortDirection.Ascending).ToString(CultureInfo.InvariantCulture));
     }
 }
        protected async Task TitleButtonClicked()
        {
            //switch direction for link:
            GridSortDirection newDir = Column.Direction == GridSortDirection.Ascending
                                           ? GridSortDirection.Descending
                                           : GridSortDirection.Ascending;

            await GridComponent.GetSortUrl(SortingSettings.ColumnQueryParameterName, Column.Name,
                                           SortingSettings.DirectionQueryParameterName, ((int)newDir).ToString(CultureInfo.InvariantCulture));
        }