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

How to disable GridEditCommandColumn?

1 Answer 173 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Guruvu
Top achievements
Rank 1
Guruvu asked on 27 Dec 2010, 01:00 PM
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...

 

1 Answer, 1 is accepted

Sort by
0
Yeroon
Top achievements
Rank 2
answered on 27 Dec 2010, 01:10 PM
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
Tags
Grid
Asked by
Guruvu
Top achievements
Rank 1
Answers by
Yeroon
Top achievements
Rank 2
Share this question
or