c# - XtraGrid shows blank row when binding it through DataTable -


i have binded xtragrid windows application through program, have added 2 data tables dataset , dataset binded datasource.

//... dataset ds = new dataset(); ds.tables.add(getcustomerdetails()); ds.tables.add(getiddetails()); ds.relations.add("id details", ds.tables[0].columns["nameid"], ds.tables[1].columns["nameid"]); gridcontrol1.datasource = ds;  //... datatable getcustomerdetails() {     con.open();      sqldataadapter da = new sqldataadapter("select  tblcustsupp.nameid,surname,firstname tblcustsupp tblcustsupp.nameid in(19471,19475)", con);     datatable dt = new datatable();     da.fill(dt);     con.close();     return dt; } datatable getiddetails() {     con.open();     sqldataadapter da = new sqldataadapter("select nameid,idtype,idissued tblid nameid in(19471,19475)", con);     datatable dt = new datatable();     da.fill(dt);     con.close();     return dt; } 

when run application, shows blank row , 1 arrow in first column clicking on arrow can see data in xtragrid. how remove blank row?

give datatables names , bind name xtragrid.

gridcontrol1.datamember = "yourdatatablename"; 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -