Click here to Skip to main content
15,887,880 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionslideshow Pin
crood29-Sep-13 19:56
crood29-Sep-13 19:56 
AnswerRe: slideshow Pin
Richard MacCutchan29-Sep-13 21:33
mveRichard MacCutchan29-Sep-13 21:33 
AnswerRe: slideshow Pin
Abhinav S30-Sep-13 18:37
Abhinav S30-Sep-13 18:37 
QuestionSelect data on the basis of URL. Pin
webmas128-Sep-13 1:11
professionalwebmas128-Sep-13 1:11 
AnswerRe: Select data on the basis of URL. Pin
Richard MacCutchan29-Sep-13 21:31
mveRichard MacCutchan29-Sep-13 21:31 
AnswerRe: Select data on the basis of URL. Pin
David Mujica30-Sep-13 2:13
David Mujica30-Sep-13 2:13 
AnswerRe: Select data on the basis of URL. Pin
Govindaraj Rangaraj30-Sep-13 23:29
Govindaraj Rangaraj30-Sep-13 23:29 
QuestionHow to Handle Null using LINQ during Datatable CrossJoin C# Pin
priyaahh27-Sep-13 0:51
priyaahh27-Sep-13 0:51 
Hi Friends

I have multiple datatables, and the datatables may or may not have data, depends on the user selection.

I have to get Cartesian Product of all the Datatables, and pass the Cartesian Product result as datasource for Gridview.

I am using following code which is working fine if all the DataTable has rows. If any of the table is not having row, then I am getting no records in my resultant cartesian product table. Please help in this.

var newDatatable = from TowerName in dtTower.AsEnumerable()
from CountryName in dtCountry.AsEnumerable()
from Level in dtLevel.AsEnumerable()
from CityName in dtCity.AsEnumerable()
from BandName in dtBand.AsEnumerable()
from EType in dtEmploymentType.AsEnumerable()
from Skill in dtSkill.AsEnumerable()
select new { TowerName, CountryName, Level, CityName, BandName, EType, Skill };

DataTable dtlinq = new DataTable("poclinq");

foreach (var item in newDatatable)
{
DataRow dr = dtlinq.NewRow();
dr["TowerName"] = item.TowerName.ItemArray[0];
dr["CountryName"] = item.CountryName.ItemArray[0];
dr["Level"] = item.Level.ItemArray[0];
dr["CityName"] = item.CityName.ItemArray[0];
dr["BandName"] = item.BandName.ItemArray[0];
dr["EType"] = item.EType.ItemArray[0];
dr["Skill"] = item.Skill.ItemArray[0];
dtlinq.Rows.Add(dr);
}
AnswerRe: How to Handle Null using LINQ during Datatable CrossJoin C# Pin
Richard Deeming27-Sep-13 2:04
mveRichard Deeming27-Sep-13 2:04 
GeneralRe: How to Handle Null using LINQ during Datatable CrossJoin C# Pin
priyaahh29-Sep-13 21:10
priyaahh29-Sep-13 21:10 
QuestionHardware ID in ASP.NET Shared Hosting environment Pin
devvvy25-Sep-13 15:14
devvvy25-Sep-13 15:14 
AnswerRe: Hardware ID in ASP.NET Shared Hosting environment Pin
Bernhard Hiller25-Sep-13 21:31
Bernhard Hiller25-Sep-13 21:31 
GeneralRe: Hardware ID in ASP.NET Shared Hosting environment Pin
devvvy25-Sep-13 23:39
devvvy25-Sep-13 23:39 
QuestionChange Image format with fixed size on image upload Pin
SAM_India25-Sep-13 11:35
SAM_India25-Sep-13 11:35 
AnswerRe: Change Image format with fixed size on image upload Pin
Bernhard Hiller25-Sep-13 21:38
Bernhard Hiller25-Sep-13 21:38 
QuestionImage Viewer in asp.net C# Pin
Member 1029206123-Sep-13 4:07
Member 1029206123-Sep-13 4:07 
AnswerRe: Image Viewer in asp.net C# Pin
Abhinav S23-Sep-13 20:34
Abhinav S23-Sep-13 20:34 
GeneralRe: Image Viewer in asp.net C# Pin
Member 1029206123-Sep-13 21:15
Member 1029206123-Sep-13 21:15 
AnswerRe: Image Viewer in asp.net C# Pin
Abhinav S23-Sep-13 21:18
Abhinav S23-Sep-13 21:18 
GeneralRe: Image Viewer in asp.net C# Pin
Member 1029206123-Sep-13 21:21
Member 1029206123-Sep-13 21:21 
QuestionAfter Binding 1000+ Records In Gridview Other Events Not Firing Pin
Arunkumar.23-Sep-13 1:59
Arunkumar.23-Sep-13 1:59 
AnswerRe: After Binding 1000+ Records In Gridview Other Events Not Firing Pin
Richard MacCutchan23-Sep-13 2:58
mveRichard MacCutchan23-Sep-13 2:58 
GeneralRe: After Binding 1000+ Records In Gridview Other Events Not Firing Pin
Arunkumar.23-Sep-13 20:07
Arunkumar.23-Sep-13 20:07 
QuestionRe: After Binding 1000+ Records In Gridview Other Events Not Firing Pin
Richard MacCutchan23-Sep-13 20:32
mveRichard MacCutchan23-Sep-13 20:32 
AnswerRe: After Binding 1000+ Records In Gridview Other Events Not Firing Pin
Arunkumar.23-Sep-13 20:41
Arunkumar.23-Sep-13 20:41 

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.