DataSet ds = new DataSet();
string SQLCompany = "select * from job_company";
string SQLjob = "select * from job_job ";
ds.Tables.Add(DbHelperSQL.GetValueDataTable(SQLCompany, "company"));
ds.Tables.Add(DbHelperSQL.GetValueDataTable(SQLjob, "job_job"));
ds.Relations.Add("job", ds.Tables["company"].Columns["comid"], ds.Tables["job_job"].Columns["comid"], false);
关键的一行代码
this.gridControl1.DataSource = ds.Tables["company"];