This question is locked. New answers and comments are not allowed.
Hi,
I am trying to use GridCommand and ToGridModel in combination but cannot find an easy way to do it.
My grid is set to custom binding, and my Controller method has a GridCommand parameter. From there I am hitting a WCF service, where after some processing I want to use ToGridModel on my IQueryable<T>. However ToGridModel(...) only accepts GridState or the sort, filter and group descripters as strings.
Because the GridCommand has them typed, I am unsure what the best way is to get from a GridCommand to parameters suitable for using with ToGridModel.
Any ideas?
Is there a way to convert a GridCommand to a GridState? Or can I use a different Mvc Action filter so the controller can use GridState instead of GridCommand? Or maybe there is an easy way of turning the sort, filter and group descriptors into strings (suitable for ToGridModel).
Many Thanks,
Andrew
p.s. Although I am using WCF services, they are not suitable for web service binding - which is why I am going the custom binding route.
I am trying to use GridCommand and ToGridModel in combination but cannot find an easy way to do it.
My grid is set to custom binding, and my Controller method has a GridCommand parameter. From there I am hitting a WCF service, where after some processing I want to use ToGridModel on my IQueryable<T>. However ToGridModel(...) only accepts GridState or the sort, filter and group descripters as strings.
Because the GridCommand has them typed, I am unsure what the best way is to get from a GridCommand to parameters suitable for using with ToGridModel.
Any ideas?
Is there a way to convert a GridCommand to a GridState? Or can I use a different Mvc Action filter so the controller can use GridState instead of GridCommand? Or maybe there is an easy way of turning the sort, filter and group descriptors into strings (suitable for ToGridModel).
Many Thanks,
Andrew
p.s. Although I am using WCF services, they are not suitable for web service binding - which is why I am going the custom binding route.