How can I select the first row in my grid on load? I use Ajax Binding.
Thanks for the help
Bruno
1 Answer, 1 is accepted
0
Rosen
Telerik team
answered on 20 Jul 2011, 12:28 PM
Hi Bruno,
You may use the dataBound event to add selected class to grid's first item:
<scripttype="text/javascript">
var selected = false;
function dataBound() {
var rows = $($(this).data("tGrid").$rows());
if (!selected) {
selected = true;
rows.first().addClass("t-state-selected");
}
}
</script>
Regards,
Rosen
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!