ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to order column of the Grid with ClientFormat
Title:
B
I
{code}
?
I have a Grid with a custom column and it does not allow to sort with the header. Sample code view: new Column { Header = "Nombre", ClientFormat = "<a href='#' onclick=\"verCesta('.(Codigo)')\" class=\"clientetarifa\" >.(Nombre)</a>" }, I have done several tests with the Column and Grid attributes "Sortable" without success. The case is similar to the example: https://demo.aspnetawesome.com/GridDemo/CustomFormat and the "Description" column of the Grid.
Save Changes
Cancel
JDPC
asked at 24 Nov 2021
Answers
B
I
{code}
?
The `Column.Bind` property needs to be set, that's how it will know by which model property to call OrderBy/OrderThenBy you can read more about data binding here: https://www.aspnetawesome.com/learn/mvc/Grid#Data-binding
Save Changes
Cancel
Omu
answered at 24 Nov 2021
Ops! Of course Thanks
at 24 Nov 2021
JDPC
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK