开发者

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

开发者 https://www.devze.com 2023-01-25 08:13 出处:网络
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 :-)

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

精彩评论

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

关注公众号