edit in place mode in radgrid

2 posts, 0 answers
  1. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 17 Dec 2009 Link to this post

    hi

    i wanna ask if its possible to unenable 1 column in radgrid edit mode in place
    because its a primary key and i want to show it but un able to modify

    thanks  a lot

    regards
    webster
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Dec 2009 Link to this post

    Hello,

    Have you tried setting the ReadOnly property to True for the column that you don't want to edit?

    Also you can try another approach as shown below for disabling particular column.
    CS:
     
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
        {  
            GridEditableItem editItem = e.Item as GridEditableItem;  
            TextBox txtbox = (TextBox)editItem["PrimaryKeyColumnUniquName"].Controls[0];  
            txtbox.Enabled = false;              
        }  
    }  

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top