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 set first row of the Grid selected by default ?
Title:
B
I
{code}
?
from this demo in section "Single select " http://demo.aspnetawesome.com/GridDemo/Selection when page load I 'd like to selection row which I want 1. by define Id 2. first row of grid
Save Changes
Cancel
nutfergie
asked at 15 Oct 2017
Answers
B
I
{code}
?
$(function(){ var grid = $('#GridId'); var firstRowId = grid.find('.awe-row').first().data('k'); grid.one('aweload', function(){ var rows = grid.data('api').select(firstRowId); if(rows.length) rows[0].addClass('awe-selected').trigger('aweselect'); }); });
Save Changes
Cancel
Omu
answered at 15 Oct 2017
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