<telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Delete" UniqueName="Delete" HeaderStyle-Width="10%">
<ItemTemplate>
<asp:ImageButton runat="server" ID="link" CausesValidation="false" ImageUrl="~/App_Themes/Images/Delete.gif"
OnClientClick="return confirm('Are you sure you want to delete?');" CommandArgument='<%#Eval("SubFacility_Id") %>'
CommandName="DeleteRow" />
</ItemTemplate>
</telerik:GridTemplateColumn>
if (e.Item is GridDataItem)
{
objcommonclient = new CMSCommonClient();
SubFacilities ObjSubFacility = new SubFacilities();
ObjSubFacility = (SubFacilities)e.Item.DataItem;
/
if (hiddenUserAccess.Value == "C" && ObjSubFacility.Status == "Approved")
{
GridDataItem dataitem=(GridDataItem)e.Item;
(dataitem["Delete"].FindControl("link") as ImageButton).Enabled = true;
}
else
{
GridDataItem dataitem = (GridDataItem)e.Item;
(dataitem["Delete"].FindControl("link") as ImageButton).Enabled = false;
}
I want to show delete image button Only the record is approved...,this is the method i followed...,
i'm getting the error Cannot find a cell bound column name "Delete"...,
need a quick reply..., thanks...,