if (RadGrid1.SelectedItems.Count != 0)
{
string Pid = Convert.ToString(Grid.SelectedValues["Pid"]);
if (!string.IsNullOrEmpty(Pid))
{
try
{
int resultDel = objSQLHelper.DeleteRowsInDb(Convert.ToInt32(Pid));
BindGrid();
}
catch (Exception ex)
{
}
}
}
else
AlertBox("Hey you, select something first.");
...
protected void AlertBox(string message)
{
ClientScript.RegisterClientScriptBlock(
Page.GetType(), "alertBox", "alert('" + message + "');", true);
}