Hide Column By Null Value

C

CanoeGuy

I establish my connection, run my stored procedure and fill a DataSet. I
bind the DataSet to a DataGrid. When I display the DataGrid some of the
columns in the DataGrid are Null all the way from the top to the bottom. Can
I hide just the null columns? If so, how?

Thanks
 
N

Nathan Sokalski

I think your only solution would be to use a loop testing each DataRow in
the DataSet. If they are all null, set the related controls' Visible
property in the DataGrid's templates to False. Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top