Hi Bhagya
Suppose ID of your CheckBox of your GridView is chkDeleteUser then use the fillowing code to delete the Rows from GridView
try
{
foreach (GridViewRow row in gvDeleteUser.Rows)
{
CheckBox chkbox = (CheckBox)row.FindControl("chkDeleteUser");
if (chkbox.Checked)
{
int uid = (int)gvDeleteUser.DataKeys[row.RowIndex].Value;
}
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
loadGriedData();
Please don't forget to add the DataKeyName="PrimaryKeyField" property in the grid view like
<asp:gridview id="Gridview1" run="server" datakeynames="CustID" xmlns:asp="#unknown">
Please check it and let me know in case of any concerns.
And please make it as resolved if it resolves.
Thanks and Regards
Suman Zalodiya