how can we display records in single datagrid using two
datasets in different place?
Answer Posted / ruby
we can do it using merge method of dataset.
but for that bot the tables must have same no. of columns , same fields and their respective datatypes.
also both the data table's name must be same("Table1" of both the datasets)
Sub BindGrid()
Dim myConnection as New SqlConnection (strConn)
Dim DS1 As DataSet
Dim DS1 As DataSet
Dim MyCommand As SqlDataAdapter
MyCommand = new SqlDataAdapter("exec s_get_table1", MyConnection)
DS1 = new DataSet()
MyCommand.Fill(DS1, "Table1")
MyCommand = new SqlDataAdapter("exec s_get_table2", MyConnection)
DS2 = new DataSet()
MyCommand.Fill(DS2, "Table1")
// Then using MERGE function of dataset we can merge both the datasets like
ds1.merge(ds2)
//binding with grid
MyDataGrid.DataSource=DS1.tables(0).DefaultView
MyDataGrid.DataBind()
End Sub
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
What is the difference between exe and dll?
i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?
Is it possible to change the index of primary key on table?
What do you mean by authorization?
Explain the function of new view engine in asp.net? : asp.net mvc
What is difference between session and application in asp net?
How to comment out asp.net tags?
What is windows active directory authentication?
What is request and response in asp.net?
What is a nested masterpage in asp.net 2.0? Can there be a master page inside a masterpage?
What I need to create and run an asp.net application?
How to find out what version of asp.net I am using on my machine?
To add a hyperlink column to the DataGrid which tag is used ?
What is a multilingual website?