开发者

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开发者_Go百科 answer, but can't figure out which property it is

Anybody help?


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

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


You can also use EmptyDataTemplate to handle what happens when there are no rows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜