Search code examples
asp.netgridviewasp.net-2.0servercontrols

ASP.NET Gridview - What property exists to find out if the grid renders or not?


When there is no DataSource assigned to my grid it doesn't render which is great!

When the datasource is empty it doesn't render - also great :-)

I am implementing some custom navigation so i want to know if there is a property that tells me if the dataview is rendered?

If it is rendered i can show my custom bits otherwise i don't.

Problem an easy answer, but can't figure out which property it is

Anybody help?


Solution

  • Would checking to see how many rows it has be ok?

    if (grid.Rows.Count > 0)...