Commit 385f3f0a HZH

数据源为空时错误

1 个父辈 a5648005
...@@ -417,6 +417,12 @@ namespace HZH_Controls.Controls ...@@ -417,6 +417,12 @@ namespace HZH_Controls.Controls
if (Page == null) if (Page == null)
{ {
if (m_dataSource == null)
{
intCount = 0;
}
else
{
if (((IList)m_dataSource).Count > intCount) if (((IList)m_dataSource).Count > intCount)
{ {
intXCount = (this.panMain.Width - 10 - 20) / (item.Width + 10); intXCount = (this.panMain.Width - 10 - 20) / (item.Width + 10);
...@@ -424,6 +430,7 @@ namespace HZH_Controls.Controls ...@@ -424,6 +430,7 @@ namespace HZH_Controls.Controls
} }
intCount = Math.Max(intCount, ((IList)m_dataSource).Count); intCount = Math.Max(intCount, ((IList)m_dataSource).Count);
} }
}
CellCount = intCount; CellCount = intCount;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!