Home > Net >  Ds1. Tables can't find my table [0] 0, beginners look big geek!
Ds1. Tables can't find my table [0] 0, beginners look big geek!

Time:09-23

The DataTable dtTran=new DataTable ();
The DataSet ds1=new DataSet ();

DtTran. Columns. The Add (" stype, "typeof (string));//add columns

DataRow dr2=dtTran. NewRow ();
Dr2 [" stype "]="data types";
DtTran. Rows. The Add (dr2);

DtTran=ds1. Tables [0];//in this tip can't find the table 0

GridControl1. The DataSource=dtTran;

CodePudding user response:

The DataSet ds1=new DataSet ();
The dataset not add table

CodePudding user response:

What are you doing this to the DataSet, strip line directly
  •  Tags:  
  • C#
  • Related