Adding rows to dataset

后端 未结 3 460
余生分开走
余生分开走 2021-02-05 04:55

How can I create a DataSet that is manually filled? ie. fill through the code or by user input. I want to know the required steps if I need to create a DataTa

3条回答
  •  悲&欢浪女
    2021-02-05 05:13

    To add rows to existing DataTable in Dataset:

    DataRow drPartMtl = DSPartMtl.Tables[0].NewRow();
    drPartMtl["Group"] = "Group";
    drPartMtl["BOMPart"] = "BOMPart";
    DSPartMtl.Tables[0].Rows.Add(drPartMtl);
    

提交回复
热议问题