I am using webgrid in the razor view of my mvc web app, a razor view contains a webgrid, I want to make the first row data to be selected by default when the page is loaded every time.
A .css called "selectRow" has been created as this:
.selectRow {
background: black;
color : white;}
I have tried this, but it doesn't work, any idea how to make it working? much appreciated! the "WebgridId" is the htmlAttributes of current webgrid
$(document).ready(function () {
$('#WebgridId tr').find("first").addClass('selectRow');
})