How to update a dataset

前端 未结 2 1172
太阳男子
太阳男子 2021-01-15 05:24

In my project, there are two textBoxes, txtName and txtPopulation and a Button, btnClick. whenever the user clicks btnClick

2条回答
  •  忘掉有多难
    2021-01-15 05:48

    DataRow[] dr = dsDetails.Tables[0].Select("Something='"+lblCountryName.Text+"'");
    if(dr.Length > 0)
    {
     dr[0][0] = "ChangeValue";//Datarow is reference to datatable it will automatically update the datatable values
    }
    dsDetails.Tables[0].AcceptChanges();
    

提交回复
热议问题