Disable a row in radgrid

4 posts, 0 answers
  1. Dorababu
    Dorababu avatar
    95 posts
    Member since:
    May 2012

    Posted 04 Oct 2012 Link to this post

    How can I disable a row in Item DataBound event. I will have a column with name Approved or Pending in the radgrid. If it is Approved I would like to enable the row if not disable the row and show some text in that place stating that the record was not approved.

    Can some one help me
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 04 Oct 2012 Link to this post


    Please try with below code snippet.

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
            if (e.Item is GridDataItem)
                GridDataItem item = e.Item as GridDataItem;
                if (item["YourColumnUniqueName"].Text.ToLower() == "approved")
                    for (int i = 0; i < item.Controls.Count; i++)
                        (item.Controls[i] as GridTableCell).Enabled = false;

    Jayesh Goyani
  3. Srikanth
    Srikanth avatar
    3 posts
    Member since:
    Sep 2013

    Posted 05 Nov 2014 in reply to Jayesh Goyani Link to this post


    I want to disable the total grid for that i set a property for that Grid1.enabled=false;
    but when i select check box in the grid it is selecting can u help me

    Thanks in advance
  4. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 10 Nov 2014 Link to this post

    Hi Srikanth,

    For detailed information about disabling RadGrid, please go through the following help article:
    As you will find out in the article, since RadGrid is a complex control, there are many scenarios where you will have to manually find some elements and disable them.

    Konstantin Dikov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top