How to disable GridEditCommandColumn?

2 posts, 0 answers
  1. guruvu
    guruvu avatar
    32 posts
    Member since:
    Sep 2010

    Posted 27 Dec 2010 Link to this post

    Hi,

    I am using following source code for Editing & deleting the records.

    <

     

    telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-HorizontalAlign="Left" HeaderText="Edit"  ItemStyle-orizontalAlign="Left">
    <HeaderStyle HorizontalAlign="Left" Width="30px" />
    <ItemStyle HorizontalAlign="Left" />
    </telerik:GridEditCommandColumn>

     

     


    <
    telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"  ConfirmDialogHeight="100px" ConfirmDialogType="RadWindow" Visible="true" ConfirmDialogWidth="220px"  ConfirmText="Are you sure you want to delete this Material Issue Request?"  ConfirmTitle="Delete" HeaderStyle-HorizontalAlign="Left"  HeaderStyle-VerticalAlign="NotSet" HeaderText="Delete" ItemStyle-HorizontalAlign="Left">
    <HeaderStyle HorizontalAlign="Left" Width="38px"/>
    <ItemStyle HorizontalAlign="Left" />
    </telerik:GridButtonColumn>

    My requirement is that based on some status field from database i would like to enable/disable these Edit,Delete buttons.

    How to get these control Id's & how to enable/disable these controls.


    Thanks in advance...

     

  2. Yeroon
    Yeroon avatar
    87 posts
    Member since:
    Oct 2012

    Posted 27 Dec 2010 Link to this post

    I would use the OnItemDataBound event of the grid. There is a sample scenario in the documentation of RadGrid here:

    http://www.telerik.com/help/aspnet-ajax/grdseteditpermissionsdependingonpermissionfield.html
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top