ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Tag field in migration
Title:
B
I
{code}
?
Hello I am migrating from 6.7.3 to version 7.0.3 I have problem with tag property. return Json(new GridModelBuilder<PositionViewModel>(items.AsQueryable(), g) { Key = "Id", GetItem = () => items.FirstOrDefault(i => i.Id == Convert.ToInt64(g.Key)), Map = MapToGridModel, DefaultKeySort = Sort.None, Tag = new { PageStatStr = $"Showing {firstElementindex} - {lastElementIndex} of {totalCount}" }, ItemsCount = totalCount, }.Build()); In prevoius version we use it like this and get this value in js $('#@(gridId)').on('aweload', function (e, data) { filterModel.showPageStats(data, '#@(statid)'); filterLine.Show(filterModel.model); }); showPageStats(data, id) { return $(id).html(data.tg.pageStatStr); } But now `data` is `aweload` event is empty object, and i get error on `data.tg.pageStatStr`. Is this a bug or i need make some workaround?
Save Changes
Cancel
Evgeny Alekseev
asked at 26 Aug 2021
Use `$('#@(gridId)').data('o').lrs.tg` instead
at 26 Aug 2021
Omu
got it, thx you
at 26 Aug 2021
Evgeny Alekseev
Answers
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