This question is locked. New answers and comments are not allowed.
Hey,
i have a RadGrid bound to a collection of entities i fetch from a webservice:
As i have to do server-side sorting, i need to build a query string from the property of my model the clicked column is bound to. Any idea how i can retrieve the DataMember Name from the column in this event?
i have a RadGrid bound to a collection of entities i fetch from a webservice:
[DataContract(Name="customer")] public class Customer : EntityBase { private string name; [DataMember(Name = "name")] [Required] public string Name { get { return name; } set { if (this.name != value) { this.name = value; OnPropertyChanged("Name"); } } } ... }}As i have to do server-side sorting, i need to build a query string from the property of my model the clicked column is bound to. Any idea how i can retrieve the DataMember Name from the column in this event?
private void RadGridView_Sorting(object sender, GridViewSortingEventArgs e) { string sortDirection; string sortColumn; // needs to be "name" for the name column
if (e.NewSortingState == SortingState.Descending) sortDirection = " DESC"; else { e.NewSortingState = SortingState.Ascending; sortDirection = " ASC"; } this.vm.Customers.OrderBy = sortColumn + sortDirection; this.vm.Customers.IsBusy = true; this.vm.Customers.Retrieve(); }