how can we display records in single datagrid using two
datasets in different place?

Answer Posted / nitin jadav

OracleConnection cn = new OracleConnection("user
id=scott;password=tiger;data source=ganesh1");
OracleDataAdapter da1 = new
OracleDataAdapter("select * from table1", cn);

DataSet ds = new DataSet();
da1.Fill(ds, "temp");

OracleDataAdapter da2 = new
OracleDataAdapter("select * from table2", cn);
DataSet ds1 = new DataSet();
da2.Fill(ds1, "temp");

ds.Merge(ds1);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
label1.Text = ds.Tables[0].Rows.Count.ToString();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where web.config file is used?

571


Why will you usually create an aspnet user account in the database for an asp.net web application?

537


Can you explain the importance of finalize method in .net?

591


What is the difference between localization and globalization?

561


Explain one critical mapping?

564






What is bound controls

588


Is there any limit for query string? Means what is the maximum size?

489


what are configuration files?

565


What is AutoPostback?

598


What is webresource axd?

464


What is an asp.net web form?

631


Can you set which type of comparison you want to perform by the comparevalidator control?

524


What are different methods of session maintenance in asp.net?

567


What is runat?

615


What is the difference between a default skin and a named skin?

593