I'm currently populating my GridView using code-behind codes and it looks like this:-

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.