又一个DBGrid和DataSet的问题,滚动条显示
ClientDataSet1是个DataSet,跟一个DBGrid关联起来,现在问题是我给这个DBGrid添加了100行的数据,
就会出现滚动条不在最上面,而且滚动条很短,但在点击滚动条后又恢复到正常,请问高手,这个DBGrid如何设置才能正常显示,谢谢了
for(UINT i = 0; i < ComPortForm->m_meeting.VecSeatList.size(); i++)
{
if(ComPortForm->m_meeting.VecSeatList[i]->m_merber.Name.Length() >0)
{
//AnsiString temp = ComPortForm->m_meeting.VecSeatList[i]->m_merber.Name;
ClientDataSet1->Append();
ClientDataSet1SeatID->Value = ComPortForm->m_meeting.VecSeatList[i]->m_ID;
ClientDataSet1Name->Value = ComPortForm->m_meeting.VecSeatList[i]->m_merber.Name;
ClientDataSet1SeatCaption->Value = ComPortForm->m_meeting.VecSeatList[i]->m_caption;
int TheID = 0;
TheID = ClientDataSet1->RecordCount ;
ClientDataSet1ID->Value = TheID++;
}
}