6 Answers, 1 is accepted
You can use the internal "orderBy" field of the grid client-side object. However make sure your code is executed after it has been updated.
Can you tell us what are you trying to achieve? There could be an easier way to do the same without the need of using internal fields.
Atanas Korchev
the Telerik team

And get the sorted data everytime I visit the page and export the same. However I am visiting the entire application.
Everytime I should get the sorted data.
You can use the OnDataBinding JavaScript event of the grid if you are using ajax binding. From there extract the orderBy field of the grid and store it for future use. If you want to do this on the server side - add a string parameter called orderBy to your action method.
Regards,Atanas Korchev
the Telerik team

Thanks for the quick response.
I did the same you explained but how can I pass the stored value to the action from javascript. I am using ajax databinding and already passing parameters to the action on the binding.
see below:
.DataBinding(dataBinding => dataBinding.Ajax()
.Select(
"_ajaxdatabinding", "controller", new
{
Id = (as Id
)ViewData["id"]).id
}))
now I need to pass the stored orderby value to the same action method through javascript.

function onDataBinding() {
var grid = $("#grid").data("tGrid");
grid.orderBy;
}
In this case just add a parameter to your action method:
public ActionResult _ajaxdatabinding(int Id, string orderBy)
{
}
Atanas Korchev
the Telerik team