I have a gridview that is being generated at runtime. When there is no records return, the gridview becomes hidden and it shows empty page which is quite confusing for the user to distinguish whether it's hidden or the page doesn't load successfully. What I need to do is to show an image indicating that the there are no records to display. So how do I set the visibility of the 'no records' image to true when it was set to false at form load.

Member Avatar

Pls check the no of record's return,if it is zero then set the visibility of the image control 'true'.
hope your reply

I tried setting the emptydatatext of the gridview and it works.