Click here to Skip to main content
15,929,596 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to upload Product XSD into Amazon site .... Pin
N a v a n e e t h13-Jun-09 5:10
N a v a n e e t h13-Jun-09 5:10 
QuestionJavascript call Pin
AB777113-Jun-09 4:29
AB777113-Jun-09 4:29 
AnswerRe: Javascript call Pin
Niladri_Biswas13-Jun-09 5:06
Niladri_Biswas13-Jun-09 5:06 
AnswerRe: Javascript call Pin
N a v a n e e t h13-Jun-09 5:08
N a v a n e e t h13-Jun-09 5:08 
GeneralRe: Javascript call Pin
AB777113-Jun-09 8:10
AB777113-Jun-09 8:10 
Questionhow can bind two tables to one grid view Pin
Bandanenilima13-Jun-09 3:28
Bandanenilima13-Jun-09 3:28 
AnswerRe: how can bind two tables to one grid view Pin
Colin Angus Mackay13-Jun-09 3:41
Colin Angus Mackay13-Jun-09 3:41 
AnswerRe: how can bind two tables to one grid view [modified] Pin
Niladri_Biswas13-Jun-09 4:54
Niladri_Biswas13-Jun-09 4:54 
First of all the question itself is not clear.

Case I

Assuming that it is database table

Solution

Produce a single resultset by aplying join or any other condition based on your demand


Case II

Assuming it is DataTable

Solution

Create a custom datatable table that will have all the fields.

Fill the table programatically and then make it as the datasource of your grid view



e.g. [ Some rough pseudo code]

Datatable dt1 = new Datatable();
dt1.Columns.Add(Col1);
dt1.Columns.Add(Col2);

dt1.Rows.Add("Val1","Val2");
dt1.Rows.Add("Val3","Val4");


Datatable dt2 = new Datatable();
dt2.Columns.Add(Year);
dt2.Columns.Add(Month);

dt2.Rows.Add("2001","Jan");
dt2.Rows.Add("2002","Feb");


Datatable dtFinal = new Datatable();
dtFinal .Columns.Add(Col1);
dtFinal .Columns.Add(Col2);
dtFinal .Columns.Add(Year);
dtFinal .Columns.Add(Month);
dtFinal .Rows.Add("Val1","Val2","2001","Jan");
dtFinal .Rows.Add("Val3","Val4","2002","Feb");


myDatagrid.DataSource = dtFinal;
myDatagrid.DataBind();


Hope this helps
Smile | :)

vote please

Niladri Biswas

modified on Saturday, June 13, 2009 11:07 AM

AnswerRe: how can bind two tables to one grid view Pin
N a v a n e e t h13-Jun-09 5:20
N a v a n e e t h13-Jun-09 5:20 
QuestionNeed help multiline textbox Pin
NetQuestions13-Jun-09 3:16
NetQuestions13-Jun-09 3:16 
AnswerRe: Need help multiline textbox Pin
Colin Angus Mackay13-Jun-09 3:44
Colin Angus Mackay13-Jun-09 3:44 
AnswerRe: Need help multiline textbox Pin
N a v a n e e t h13-Jun-09 5:26
N a v a n e e t h13-Jun-09 5:26 
Questionhow to set multilingual setting Pin
anbusenthil13-Jun-09 2:24
anbusenthil13-Jun-09 2:24 
AnswerRe: how to set multilingual setting Pin
Parwej Ahamad13-Jun-09 3:27
professionalParwej Ahamad13-Jun-09 3:27 
GeneralRe: how to set multilingual setting all pages of a websites Pin
anbusenthil14-Jun-09 18:53
anbusenthil14-Jun-09 18:53 
GeneralRe: how to set multilingual setting all pages of a websites Pin
Parwej Ahamad15-Jun-09 3:58
professionalParwej Ahamad15-Jun-09 3:58 
AnswerRe: how to set multilingual setting Pin
Niladri_Biswas13-Jun-09 5:09
Niladri_Biswas13-Jun-09 5:09 
QuestionIntegrating SqlServerReportingServices into asp.net application? Pin
Pawan Kiran13-Jun-09 1:30
Pawan Kiran13-Jun-09 1:30 
AnswerRe: Integrating SqlServerReportingServices into asp.net application? Pin
Manas Bhardwaj13-Jun-09 1:35
professionalManas Bhardwaj13-Jun-09 1:35 
QuestionERROR: The state information is invalid for this page and might be corrupted. Pin
keyur satyadev13-Jun-09 1:18
keyur satyadev13-Jun-09 1:18 
AnswerRe: ERROR: The state information is invalid for this page and might be corrupted. Pin
Manas Bhardwaj13-Jun-09 1:31
professionalManas Bhardwaj13-Jun-09 1:31 
GeneralRe: ERROR: The state information is invalid for this page and might be corrupted. Pin
keyur satyadev13-Jun-09 2:09
keyur satyadev13-Jun-09 2:09 
Questionhow to set image and background pic and background Pin
anbusenthil13-Jun-09 1:14
anbusenthil13-Jun-09 1:14 
AnswerRe: how to set image and background pic and background Pin
keyur satyadev13-Jun-09 1:25
keyur satyadev13-Jun-09 1:25 
Questionajax toolkit controls in user control Pin
Member 387988113-Jun-09 0:32
Member 387988113-Jun-09 0:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.