Null Column in Details View in ASP.NET

Posted by Nishadullas under ASP.NET on 7/21/2011 | Points: 10 | Views : 2231 | Status : [Member] | Replies : 2
Hi...
I have binded a DetailsView(ASP.NET Control) to a Table of Sql Server 2005, after binding it shows the columns which has NULL values though the filed is blank the field name is visible on DetailsVIew.

My requirement is that, if the field in Table is containing a NULL value then the Field's name also should not be showed in the Details View's columns.
So anyone please tell me how to solve my this problem.

Hope i will get a solution at the most earliest

Regards
Nishad




Responses

Posted by: Neha-kapoor on: 7/21/2011 [Member] Starter | Points: 25

Up
0
Down
hallo
if you use the select query then this is possible that
show particular column
you can write the conditional statment


thanks

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mcadeepuraj on: 7/21/2011 [Member] Starter | Points: 25

Up
0
Down
you can use conditional statement for select as
select col1 , col2 from tablenm where col1 is not null.

Deepak Kumar

Nishadullas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response