Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7748021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:40:37+00:00 2026-06-01T10:40:37+00:00

Using a Telerik Grid with ASP.NET MVC 3 Razor engine. When a user selects

  • 0

Using a Telerik Grid with ASP.NET MVC 3 Razor engine.

When a user selects a row, we un-hide some part of the page. This is working fine when I click on a row.

However, I need to automatically select the first row when the page is loaded

I can change the row display color so it appears selected, but I can’t figure out how to have the select event called!

Here is the grid code :

    @(Html.Telerik().Grid<SomethingViewModel>()
            .Name("SomethingGroupGrid")
            .ClientEvents(events =>
                {
                    events.OnDataBinding("SomethingGroupGrid_onDataBinding");
                })
                    .DataBinding(dataBingding => dataBingding.Ajax().Select("SomethingGroupGrid", "Something"))
            .Columns(columns =>
                {
                    columns.Bound(c => c.Id).Hidden();
                    columns.Bound(c => c.Name)
                    .Title("Groups");
                })
            .Selectable()
            .Pageable(x => x.PageSize(10))
            .ClientEvents(events => events.OnRowSelect("SomethingGroupGrid_RowSelect"))


         )

Can someone help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:40:38+00:00Added an answer on June 1, 2026 at 10:40 am

    Ok I found a freakishly ugly solution :

    I added a OnRowDataBound event on the grid. This OnRowDatabound Functions fires the OnRowSelect events.
    Then I added page global javascript variable to hold a bool value that checks if the first row has been selected, so the OnRowDatabound does not call OnRowSelect for each row.

    @(Html.Telerik().Grid<SomethingViewModel>()
            .Name("SomethingGroupGrid")
            .ClientEvents(events =>
                {
                    events.OnDataBinding("SomethingGroupGrid_onDataBinding");
                })
                    .DataBinding(dataBingding => dataBingding.Ajax().Select("SomethingGroupGrid", "Something"))
            .Columns(columns =>
                {
                    columns.Bound(c => c.Id).Hidden();
                    columns.Bound(c => c.Name)
                    .Title("Groups");
                })
            .Selectable()
            .Pageable(x => x.PageSize(10))
            .ClientEvents(events => events.OnRowSelect("SomethingGroupGrid_RowSelect"))
            .ClientEvents(events => events.OnRowDataBound("SomethingGroupGrid_OnRowDataBound"))
    
    
         )
    <script type="text/javascript">
          var firstRowSelected = false;
    
          function PreviewAccountGrid_DataBound(e) {
    
          if (firstRowSelected == false) {
              SomethingGroupGrid_RowSelect(e);
              firstRowSelected = true;
           }
           }
    
    </script>
    

    Plese tell me that there is a better way to do that, or it will severely degrade my opinion of Telerik controls (which is already damn low).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a Telerik MVC Batch editable grid with ASP.Net MVC3 Razor views.
I am using the telerik ASP.NET MVC Grid template and currently have several check
I am using ASP.NET MVC architecture.I have a telerik window on a button click,
I am using Telerik MVC grid ajax binding to show some records. While the
I am using the latest version Telerik MVC controls . I am using ASP.NET
I am using the latest version of Telerik MVC controls on my ASP.NET MVC3
Currently using Telerik ASP .NET MVC Controls version 2011.2.712 Hello all, I am trying
in my ASP. Net MVC 3.0 Project. I have Telerik Grid. with in the
I'm using telerik ASP.Net Ajax grid component, and I'm facing a problem. If I'm
In web application[asp.net], i am using telerik grid control, i am bind the data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.