4
Reply

i have Updaton in Chekedlist box list items

Zakir Ahamed

Zakir Ahamed

Aug 29 2017 4:10 AM
186
hi Friends
i have Problem To Update in GridView, i Think my Update code is Problem i as Follows:
 
else if (btncategory.Text == "Update")
{
Hashtable hstbl = new Hashtable();
DataGridViewRow row = GvCategory.Rows[indexRow];
hstbl.Add("@status", "update");
hstbl.Add("@CategoryId", Convert.ToInt32(row.Cells[0].Value));
hstbl.Add("@updatedby", Global.UserID);
List<String> iList = new List<String>();
foreach(var item in clbbrand.CheckedItems)
{
hstbl.Add("@BrandId",row.Cells[1].Value);
}
Int64 dt = DataAccessLayer.ExecuteCommand_RowsAffected("Category_Mst_sp", hstbl);
if (dt >= 0)
{
MessageBox.Show("Category Details Updated Sucessfully", "Category Alert");
txtcategory.Text = string.Empty;
LoadCategory();
btncategory.Text = "SAVE";
}
else
{
MessageBox.Show("Already Entered the Category");
}
}
If Anyone tell how i will modified code the sele cted list Item To be update on My table
 
 

Answers (4)