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


    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: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" />

    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:
Back to Top