假设我在gridview中有4行,并且我只想删除第二行,那么如何从表中获取动态ID,以便我可以删除具有唯一ID的特定行
这是我的查询,但我无法提供相应的ID: -
protected void GrdTraining_DeleteCommand(object sender, Obout.Grid.GridRecordEventArgs e)
{
if (Session["dt10"] != null)
{
dt10 = (DataTable)Session["dt10"];
}
else
{
BindDatatable();
}
DataRow[] grdTrain = dt10.Select("SR_NO=" + Convert.ToString(e.Record["SR_NO"]));
dt10.Rows.Remove(grdTrain[0]);
AddToViewState("GrdTraining");
CF.ExecuteDT("DELETE FROM EMP_ATTACHED_DOCUMENTS where mkey="+ ); // mkey is my unique column in the table, how to get the ID here for the row which I want to delete ??
}
请建议