![]() ![]() user Id=sa Password= Initial Catalog=shopping ") SqlConnection con = new SqlConnection("Integrated Security=SSPI data source=. SqlDataAdapter adap = new SqlDataAdapter("Select * from ProductDetails", conn) SqlConnection conn = new SqlConnection("Integrated Security=SSPI data source=. ![]() Protected void Page_Load(object sender, EventArgs e) Update unable to find TableMapping or DataTable 'ProductDetails'. If have put the check box in the template field and for i am using button control to delete the rows. Again call the function to fill ur grid here.Ībove you can check using any Boolean or int variable that whether the data is being deleted or not. SqlCommand cmd = new SqlCommand(query, conn) String query = "delete customers where customerid = '" + CustomerID + "'" SqlConnection conn = new SqlConnection(/*Here you write ur connection string. (Generally, these are the primary keys only.) Here is the way to retrieve DataKeyName tht u must write in aspx page. Here you will get the index of the row which you want to delete. Protected void gv1_RowDeleting(object sender, GridViewDeleteEventArgs e) This is RowDeleting event of your gridview. If tht's wht ur asking for, please find the code below, i hope it can be helpful for u. What i understood that u want the code for deleting the records from GridView 1 by 1. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |