ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How change some row after grid loaded ?
Title:
B
I
{code}
?
I use awe-grid but now I have big problem some column of row is calculate from query on big database. follow this firstname | lastname| riskLevel ------------------------------- Donald | Trump| high (is high if found firstname lastname in big database ) Cristiano | Ronaldo| low (is low if not found firstname lastname in big database ) if I bind riskLevel at MapToGridModel my grid have long time for load . (bad thing for user) So I 'd like not to bind riskLevel at MapToGridModel but I want to calculate riskLevel each row after grid loaded follow this Step 1 - load grid firstname | lastname| riskLevel ------------------------------- Donald | Trump| - Cristiano | Ronaldo| - Step 2 - via jquery get firstname ,lastname from each row and use awe.oc (ajax) for calculate find riskLevel from big database Step 3 - via jquery change riskLevel colume of row firstname | lastname| riskLevel ------------------------------- Donald | Trump| high (after awe.oc return value) Cristiano | Ronaldo| - for Step 2 , Step 3 How I get data column of each row? How I change show data of each row ? or have another solution for solve this issue . so pls suggest me . thx
Save Changes
Cancel
nutfergie
asked at 16 Aug 2018
Answers
B
I
{code}
?
think you should solve this problem at the server, optimise, determine why is it taking so long, maybe use caching; now to answer you questions: How I get data column of each row ? `$row.data('model');` How I change show data of each row ? use plain jquery to modify the content of a `td` cell or use `api.update(key)` (like in utils.js itemEdited), or `api.renderRow` var newrow = grid.data('api').renderRow(rowModel); oldrow.after(newrow); oldrow.remove();
Save Changes
Cancel
Omu
answered at 16 Aug 2018
thx for suggestion
at 17 Aug 2018
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