Advertisement

05.13.2008 at 09:46PM PDT, ID: 23400288
[x]
Attachment Details

Display headers for gridview when no data found using Linq

Asked by GMSDev in Language Integrated Query - LINQ, C# Programming Language, Programming for ASP.NET

Tags: C# Linq SQL

I know there have been many creative solutions to the problem where the Gridview does not display its headers unless at least one row is bound but I need one for use with Linq.

I was looking at this solution which I think would work well but I need some syntax help:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_21766789.html

I want to query the database using Linq and if the query does not return anything then I want the query to return a blank row so I will always bind at least one row of data.  Can anyone help or pose a better solution?Start Free Trial
[+][-]05.14.2008 at 11:44PM PDT, ID: 21571097

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 11:06AM PDT, ID: 21576522

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Language Integrated Query - LINQ, C# Programming Language, Programming for ASP.NET
Tags: C# Linq SQL
Sign Up Now!
Solution Provided By: GMSDev
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628