Instead of using NoRecordsTemplate, I suggest the following:
- Add clientevent to your grid: .ClientEvents (events => events.OnLoad ("Grid_onLoad"))
- Add javascript function: function Grid_onLoad (e) {$ ('. T-no-data td'). text ('Download'); }
That way, if there are no records, the grid will still display “No records”, but the user will see a “Download” message during an ajax call.
source share