Hi there,
I need some help on RadGrid and its autosort :)
I want a Header column clickable to start OnSortCommand then my tableview.rebind.
But my data linked with DataSource , are already sorted as i want , nothing else :)
Each time i click header column , i can see my data but sorted again by RadGrid.
I try lot of thing to stop auto sorting :D Nothing works
On Tableview :
My NeedDataSource :
tb is exact data sorted as i want but i want to avoid autosorting done by radgrid or tableview after "
Any Helps ? =D
I need some help on RadGrid and its autosort :)
I want a Header column clickable to start OnSortCommand then my tableview.rebind.
But my data linked with DataSource , are already sorted as i want , nothing else :)
Each time i click header column , i can see my data but sorted again by RadGrid.
I try lot of thing to stop auto sorting :D Nothing works
On Tableview :
tableView.AllowNaturalSort = false;tableView.OverrideDataSourceControlSorting = true;tableView.AllowSorting = false;tableView.SortExpressions.Clear(); tableView.Rebind();My NeedDataSource :
protected void rg_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { try { this.rg.VirtualItemCount = this.ItemCount; DataTable tb ; if (string.IsNullOrEmpty(sortedFieldClicked)) tb = this.DataSourceObject.GetData(this.TabId, this.rg.CurrentPageIndex + 1, this.rg.PageSize, null, SortOrder.None); else { tb = this.DataSourceObject.GetDataBySortedField(this.TabId, this.rg.CurrentPageIndex + 1, this.rg.PageSize, sortedFieldClicked, actualSortOrder); } this.rg.DataSource = tb; } catch (Exception ex) { UIProcessHelper.AddMessage(String.Format("Error while fetching data for tab '{0}' TODO List: {1}", this.TabId,ex.Message), UIMessage.UIMessageType.error); } }this.rg.DataSource = tb;
tb is exact data sorted as i want but i want to avoid autosorting done by radgrid or tableview after "
this.rg.DataSource = tb;"Any Helps ? =D