check for visibility of rows in detailsview

Posted by Nishadullas under ASP.NET on 9/14/2011 | Points: 10 | Views : 1358 | Status : [Member] | Replies : 2
Hi.....
I am facing a problem in asp.net.
I have used a detailsview in asp page and a label. My condition is that if the rows of that detailsview is not visible then the label also should not be visible.
I have used SQLDatasource control to populate the detailsview and if any row contains a null value then the Row itself becomes invisible.
Now here if all the Rows is invisible then the label should also be invisible.
Can anyone help me with the c# code.....




Responses

Posted by: Jpchoudhari on: 9/14/2011 [Member] Starter | Points: 25

Up
0
Down
hi,

Where is your label placed?? Is it in detailsview??


Kind Regards,
Jay

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

Posted by: Nishadullas on: 9/14/2011 [Member] Starter | Points: 25

Up
0
Down
Thank you Jay for responding to my request.
Actually that label is not placed inside the detailsview its outside.. i have placed that label in such a manner that it would act as the HeaderText of the DetailsView and if all the rows of the detailsview is invisible then the Label which is acting as its Header Text will also become invisible.And for your kind information let me tell you that i have designed the detailsView in that manner if the record in Database is NULL then that particular row of the detailsview becomes invisible.

If you have an alternate solution for making the headerText of the detailsview invisible if all the rows of that detailsview is invisible please forward me the code.
C# code will be more appreciatable..
Once again Thank you Jay

Regards
Nishad

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

Login to post response