protected void Gvaddproduct_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.ToUpper() == "DELETE")
{
int? DeleteProductStatus;
GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
int index = row.RowIndex;
objhatcheryPL.sno1 = Convert.ToInt16(Gvaddproduct.DataKeys[index].Value);
DeleteProductStatus = objhatcheryBAL.ProductDetDelete(objhatcheryPL);
FillProductDetails();
if (DeleteProductStatus.Equals(1))
{
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "UpdateDetails", "alert('Deleted Successful');", true);
}
}
}
與此代碼我不能直接獲得排deleting.what錯在這個清爽的,任何人可以幫助我如何刪除一行,而無需使用rowcommand事件
正確地你需要什麼?爲什麼你在刷新?你的問題是什麼 – Bhagavan
@Bhagavan我想刪除一個Row.I已經寫了代碼,但沒有得到輸出沒有刷新。我想直接刪除行而不刷新 – santhosha
@santhosa確保您在刪除後調用網格。 – Bhagavan