/// <summary> /// Sorting is changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MyList_SortingChanged(object sender, DevExpress.Windows.Controls.SortingEventArgs e) { // Search mode don't support sorting if (this.ContentPageCtx.InSearchMode == true) { // TODO: show message return; } }
/// <summary> /// "Sort by certain column' changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MyList_SortingChanged(object sender, DevExpress.Windows.Controls.SortingEventArgs e) { // Search mode don't support sorting if (this.ContentPageCtx.InSearchMode == true) { // TODO: show message return; } // Category list is not paged. So it is not necesary to re-fetch the data from backend(We assume there is only one admin) this.UpdateOrderBy(); this.NeedUpdateTableData = false; this.NeedUpdateTableUI = true; this.BeginUpdateEntireUI(); }
/// <summary> /// Callback handler of update list /// </summary> /// <param name="sender"></param> /// <param name="e"></param> //void client_getAllCompleted(object sender, HappyDog.SL.Beelun.Shoppro.WebService.TabManager.getAllCompletedEventArgs e) //{ // if (e.Error == null) // { // // Array -> ObservableCollection // ObservableCollection<tab> categoryCollection = new ObservableCollection<tab>(); // foreach (tab i in e.Result) // { // categoryCollection.Add(i); // } // this.ContentPageCtx.TotalItemCount = categoryCollection.Count; // this.ContentPageCtx.DataSource = categoryCollection; // this.CurrentViewTitle = string.Format(UIResources.MAINVIEW_RECORDSNUMBER, this.CurrentBodyViewTitleDesc, this.ContentPageCtx.TotalItemCount); // this.UpdateTableUI(); // ShopproHelper.HideBusyIndicator(this); // } // else // { // ShopproHelper.HideBusyIndicator(this); // ShopproHelper.ShowMessageWindow(this, "Error", e.Error.Message, false); // } //} /// <summary> /// "Sort by certain column' changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MyList_SortingChanged(object sender, DevExpress.Windows.Controls.SortingEventArgs e) { // Search mode don't support sorting if (this.ContentPageCtx.InSearchMode == true) { // TODO: show message return; } if (2 > 1) // No point in going back to the server if we only have 1 page of data { // Update orderBy this.UpdateOrderBy(); this.NeedUpdateTableData = true; this.NeedUpdateTableUI = true; this.BeginUpdateEntireUI(); } }