c# - Reading master and child tables from a combined table -


am using infragistics ultrawingrid.ultragrid control show hierarchical data in .net 3.5 winforms app. middle tier, datatable has combined data both master , child tables. can data child table using group clause.

am using datarelation below, , bind local dataset variable containing master , child table grid.

ds.tables.add(tablemaster);  ds.tables.add(tablechild);  datarelation reln = new datarelation("myreln", ds.tables[0].columns[colname], ds.tables[1].columns[colname], false); ds.relations.add(reln);   ds.acceptchanges();   this.ultragrid.datasource = ds; 

my query is, fastest way read tablemaster , tablechild consolidated datatable above?

thanks.

perhaps should store join result in datagridview control:

string sql = "select * " +   "from tablemaster m " +   "left join tablechild c on m.colname=c.colname"; // selectdatatable collection method datatable bigtable = selectdatatable(sql); this.ultragrid.datasource = bigtable.defaultview; 

this way, data available.

edit: of course, add bigtable dataset , access whenever necessary.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -