joeharrison714 / MVCGrid.Net

http://mvcgrid.net
MIT License
74 stars 55 forks source link

Invalid HTML generated for sort onclick attributes #30

Closed alexangas closed 8 years ago

alexangas commented 8 years ago

Client-side sorting is generating invalid HTML because the onclick attribute is using double-quotes, and the script inside is also using double-quotes. Example:

<th onclick="MVCGrid.setSort("CarRecords", "OriginatingLaboratoryName", "Dsc"); return false;"
    style="cursor: pointer;">

This should be fixable by using single quotes in MakeGotoPageLink() and MakeSortLink()

alexangas commented 8 years ago

Correction: this only occurs when using a custom rendering view. I'll look at fixing the provided _Grid.cshtml.