Hey guys,
we are using your MVC grid and after a lot of complications and try-and-error-handling (because in my opinion there is way to less API / Description from your side) I have handled the most problems.
Neither then less - your control looks beautiful and is very fast and responsive.
What I really miss here in ym MVC Grid is the option to have a default sorting - how to do that?
At the moment this is my sorting algorythm of my controller:
if (String.IsNullOrEmpty(orderby))
allDataForList = allDataForList.OrderByDescending(x => x.EndDate);
else
{
bool desc = false;
if (orderby.IndexOf("desc") > 0)
{
desc = true;
orderby = orderby.Remove(orderby.IndexOf(" desc"));
}
allDataForList = LinqExtensions.OrderByField(allDataForList, orderby, desc);
}
which means: If there is no sorting, sort on EndDate. But the problem here is, that there is no icon displayed on the front end for the sorting then and if I click on EndDate Coloum there will be the exact sorting I have done allready. Feels buggy.
I allready tried to do this by javascript with something like:
$("#Grid").ejGrid("sortColumn", "ProjectID", "Descending");
But this seems complete buggy as hell - the sort works, but the sorting-icon will be displayed wrong (at first it will be displayed correct but on a click on this coloum there is a second sorting-icon which seems to be a obvious bug).
Do you have a solution for this?