| | |
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; 32 Days Ago at 2:31 am.
•
•
Join Date: Jun 2009
Posts: 435
Reputation:
Solved Threads: 82
0
#2 31 Days Ago
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
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu dynamically edit expose fill flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery listbox login menu microsoft mono mouse mssql multistepregistration news numerical objects opera order panelmasterpagebuttoncontrols radio ratings registration reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





