Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > Grid > client side row select
Telerik MVC Extensions are no longer supported (see this page for reference). In case you have inquiries about Kendo UI Complete for ASP.NET MVC, post them in the pertinent Kendo UI forums.

Answered client side row select

Feed from this thread
  • Patrick Rubeski avatar

    Posted on Mar 29, 2010 (permalink)

    I'm looking for a way to select a row in the grid via client side code.  I am trying to select the first row in the grid each time the page loads. Does anyone know of way to do this?  I've been searching the posts for awhile now and haven't found anything related.
    Thanks in advance for any info.

  • Atanas Korchev Atanas Korchev admin's avatar

    Posted on Mar 29, 2010 (permalink)

    Hi Patrick Rubeski,

    If you need to show the first row as selected you can do this:


    .ClientEvents(events => events.OnLoad("onLoad"))


    <script type="text/javascript">
        function onLoad() {
            $('#Grid tr:has(td):first').addClass('t-state-selected');
        }
    </script>

    Kind regards,
    Atanas Korchev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

  • Patrick Rubeski avatar

    Posted on Mar 29, 2010 (permalink)

    is there a way to select this row in a way that actually triggers the OnRowSelected client event?

  • Answer Atanas Korchev Atanas Korchev admin's avatar

    Posted on Mar 30, 2010 (permalink)

    Hello Patrick Rubeski,

    Try this

    $('#Grid tbody tr:has(td):first').click()

    Regards,
    Atanas Korchev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > Grid > client side row select
Related resources for "client side row select"

ASP.NET MVC Grid Features  |  Documentation  |  Demos  |  Telerik TV ]