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 hide "no records found" when create inline row
Title:
B
I
{code}
?
pls see this img http://puu.sh/y9D1p/2771e241e8.png for grid no row when start - i'd like to show "no records found" when create inline row - i'd like to hide "no records found" when click save - i'd like to hide "no records found" when click cancel - i'd like to show "no records found"
Save Changes
Cancel
nutfergie
asked at 29 Oct 2017
Answers
B
I
{code}
?
in `awem.js` find function `function gridLoading(o, opt)` and replace it with this: function gridLoading(o, opt) { opt = opt || {}; opt.lhtm = opt.lhtm || '<div class="spinner"><div class="dot1"></div><div class="dot2"></div></div>'; var ctm = opt.ctm || 40; var $grid = o.v; var $mcontent = $grid.find('.awe-content'); function setNoRec() { console.log('check'); setTimeout(function () { $mcontent.find('.ogempt').remove(); if (!$mcontent.find('.awe-row').length) { $mcontent.prepend($('<div class="ogempt">' + cd().NoRecFound + '</div>') .css('margin-top', Math.max(($mcontent.height() / 2) - 90, 10) + 'px')); } }); } $grid.on('awebeginload', function (e) { if ($(e.target).is($grid)) { $grid.find('.ogempt').remove(); var $spin = $('<div class="spinCont">' + opt.lhtm + '</div>').hide(); $spin.height($mcontent.height()); $mcontent.prepend($spin); $spin.children().first().css('margin-top', ($mcontent.height() / 2 - ctm) + 'px'); $spin.fadeIn(); } }).on('aweload', function (e, res) { if ($(e.target).is($grid)) { $mcontent.find('.spinCont:first').fadeOut().remove(); setNoRec(); } }).on(saweinledit + ' ' + saweinlcancel, setNoRec); }
Save Changes
Cancel
Omu
answered at 29 Oct 2017
I done but whenn I click cancel "no records found" not come back again ( in case 4) 1 - when start - i'd like to show "no records found" 2- when create inline row - i'd like to hide "no records found" 3 - when click save - i'd like to hide "no records found" 4 - when click cancel - i'd like to show "no records found"
at 29 Oct 2017
nutfergie
I've edited my answer, try again
at 29 Oct 2017
Omu
555 I have solved function cancelRow($row, isClick) { .... } $grid.trigger(saweinlcancel+"-grid"); // nutedit --- add new code //nutedit $grid.on(saweinledit + " " + saweinlcancel + "-grid", function () { if ($grid.find('.awe-row').length) { $grid.find('.ogempt').hide(); } else { $grid.find('.ogempt').show();} }); alright I will read your solution I will instead your code thx
at 29 Oct 2017
nutfergie
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