| | |
BoundFields with different DataSources
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 19
Reputation:
Solved Threads: 0
I'm currently populating my GridView using code-behind codes and it looks like this:-
Is there a possibility where I can have a different DataSource for the different BoundFields that I insert?
Perhaps, Column 1 - 5 uses SQLDataSource1, Column 6 uses SQLDataSource2, and Column 7 uses SQLDataSource3
ASP.NET Syntax (Toggle Plain Text)
BoundField boundField = new BoundField(); boundField.DataField = "student_name"; boundField.HeaderText = "Name"; GridView1.Columns.Add(boundField);
Is there a possibility where I can have a different DataSource for the different BoundFields that I insert?
Perhaps, Column 1 - 5 uses SQLDataSource1, Column 6 uses SQLDataSource2, and Column 7 uses SQLDataSource3
Last edited by dfs3000my; Oct 29th, 2009 at 2:31 am.
•
•
Join Date: Jun 2009
Posts: 449
Reputation:
Solved Threads: 82
0
#2 Oct 30th, 2009
You cannot assigne multiple data sources such as DataTables, SqlDataSources to the bound columns in a GridView. The data source should come from a single object.
If your want to retrieve records from different database tables which reside in different servers, you need to write some logic to fetach data from different database servers/tables, store it in temprory tables and combine them into single DataTable and assigne them to GridView.
If your want to retrieve records from different database tables which reside in different servers, you need to write some logic to fetach data from different database servers/tables, store it in temprory tables and combine them into single DataTable and assigne them to GridView.
![]() |
Similar Threads
- How to Connect MySQL from JSP Page (JSP)
- Need Visual basic Tutorial (VB.NET)
- Java Stock Trend Analysis Program :) (Java)
- code error (ColdFusion)
- Any way to combine two datasources into one recordset? (ASP)
Other Threads in the ASP.NET Forum
Views: 274 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox child class compatible complex content contenttype control countryselector courier database datagrid datagridview datalist deployment development dgv dialog dropdown dropdownmenu dynamic dynamically edit editing embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv folder form gridview gudi iis image javascript languages list maps menu mobile mssql nameisnotdeclared novell opera order problem profile ratings redirect refer registration relationaldatabases reportemail response.redirect rows search security select serializesmo.table sessionvariables silverlight smoobjects software sql ssl tracking treeview typeof validatedate validation vb.net vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xsl





