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 9233985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:40:58+00:00 2026-06-18T06:40:58+00:00

I have a Telerik asp.net grid on my view. The model that is connected

  • 0

I have a Telerik asp.net grid on my view. The model that is connected to this grid has a field named “State”. This field holds the state of each row. Based on this state, user can edit some of the rows, and can’t edit the rest. For example if state of a row is 0, the user can edit it, otherwise the edit button and other commands of that row must be disabled.

So my question is: Is there a way to disable some of the rows based on the model’s fields?

here is the simplified grid:

@{Html.Telerik().Grid<StationEvaluation>().Name("ManagementGrid").DataKeys(dataKeys => dataKeys.Add(o => o.StationEvaluationID)).Groupable().Filterable().Pageable().Sortable().DataBinding(dataBinding => dataBinding.Ajax()
                           .Delete("DeleteFromGrid", "StationEvaluation")
                        ).Columns(columns =>
                        {
                            columns.Command(commands =>
                            {
                                commands.Delete().ButtonType(GridButtonType.Image);
                                commands.Custom("Edit").Action("Edit", "StationEvaluation").ButtonType(GridButtonType.Image).Text("Edit");
                            }).Title("Manage").Width(50);
                            columns.Bound(o => o.FromDate);
                            columns.Bound(o => o.ToDate);
                            columns.Bound(o => o.DateShow);
                            columns.Bound(o => o.State).ClientTemplate("<#= StateDsc #>");
                            columns.Command(commands =>
                            {
                                commands.Custom("NextState").Action("NextState", "StationEvaluation").ButtonType(GridButtonType.Text).Text("Next state").Ajax(true);
                                commands.Custom("PreviousState").Action("PreviousState", "StationEvaluation").ButtonType(GridButtonType.Text).Text("Previous state").Ajax(true);
                            }).Title("Change state").Width(50);
                        }).Render();
 }
  • 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-18T06:40:59+00:00Added an answer on June 18, 2026 at 6:40 am

    I found the solution. The onRowDataBound event must be added to the gird. In this method I can hide the columns that user needs them to edit:

    function ManagementGrid_onRowDataBound(e) {
    
        var dataItem = e.dataItem;
    
        if (dataItem.State == 0)
        {
            $(e.row).find("a.t-grid-PreviousState").hide();
        }
        else if (dataItem.State == 4) {
            $(e.row).find("a.t-grid-NextState").hide();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Telerik grid in my asp.net mvc application that looks something like:
I have a telerik grid in an asp.net mvc3 (RAZOR) View. While designing I
We have a Telerik Grid (i.e. enhanced version of ASP.Net vanilla grid). On some
I have grid in my ASP.NET page (actualy it's Telerik RadGrid). There is GridButtonColumn
I have a Telerik Grid which has a footer that needs to display column
I am using Telerik asp.net mvc extensions. I have an issue that happens only
I have an ASP.net 4.0 website that uses Telerik controls. Recently the past dev
I have a simple Telerik Grid for ASP.NET MVC with Ajax delete command. The
I am using the telerik ASP.NET MVC Grid template and currently have several check
Telerik ASP.NET MVC Q2 2011 I have a grid which is Ajax bound: @(Html.Telerik().Grid<IUser>()

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.