How To Hide – Show Image Button in Telerik Rad Grid

In order to set the visibility for the control , you need to access the control first and then set the visibility. Here is a sample code. In C# protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e){if (e.Item is GridDataItem){GridDataItem item = (GridDataItem)e.Item;if (Item.FindControl("UniqueName") as Textbox (your control's Unique Name))// Add your condition{item .Visible=false; // setting visibility of …

How to Dynamically Change the Image Button of Telerik RadGrid

In order to set the Image for the GridButton Column in Telerik Rad Grid, you need to access the control first from server side and then set the Image dynamically. Here is a sample code. protected void grdDemo_ItemDataBound(object sender, GridItemEventArgs e){if (e.Item is GridDataItem){var item = (GridDataItem)e.Item;if() // your condition here(item.Controls as ImageButton).ImageUrl = "~/Content/Images/icon_cancel_fade.gif";}} You …

String Cannot be Zero Length When Replacing

Some times during programming we are in hurry and not take care of these small issues like String Cannot be Zero Length. We should only take care about that when we perform replacing the old value, this value must have some text, otherwise we will get this same error of String Cannot be Zero Length. So …