DEVEXPRESS控件中的GRIDCONTROL 绑定数据不显示
DEVEXPRESS控件中的GRIDCONTROL 绑定数据不显示
我是winfrom程序,在界面加载的时候,从数据库取得数据集合
if (m_QuestionList.Count != 0)
{
BindingList<InfoQuestion> ret = new BindingList<InfoQuestion>();
for (int i = 0; i < m_QuestionList.Count; i++)
{
ret.Add(new InfoQuestion(m_QuestionList[i].m_Number, m_QuestionList[i].m_Types, m_QuestionList[i].m_Difficult,
ConfigUtil.GetFromBase64String(m_QuestionList[i].m_SubjectContent), m_QuestionList[i].m_Fraction, m_QuestionList[i].m_Answer,
ConfigUtil.GetFromBase64String(m_QuestionList[i].m_KnowledgePoint), ConfigUtil.GetFromBase64String(m_QuestionList[i].m_AnswerAnalytical), m_QuestionList[i].m_intAnswerNumber));
}
this.gridControl1.DataSource = ret;
}
界面上只显示空的表格,没有数据在上面。
谁来帮我解惑?
------解决方案--------------------有给gridcontrol的gridview绑定列吗?
或是调用gridControl1.refreshdatasource试试。
------解决方案--------------------指定数据源还没数据绑定呢
------解决方案--------------------看看m_QuestionList.Count为多少
用法