This is a migrated thread and some comments may be shown as answers.

Disable a row in radgrid

3 Answers 1033 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dorababu
Top achievements
Rank 1
Dorababu asked on 04 Oct 2012, 11:58 AM
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

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 04 Oct 2012, 12:44 PM
Hello,

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;
                }
            }
        }
    }


Thanks,
Jayesh Goyani
0
Srikanth
Top achievements
Rank 1
answered on 06 Nov 2014, 04:37 AM
Hai

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
0
Konstantin Dikov
Telerik team
answered on 10 Nov 2014, 01:10 PM
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.


Regards,
Konstantin Dikov
Telerik
 

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.

 
Tags
Grid
Asked by
Dorababu
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Srikanth
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or