全选Grid下的checkbox
表格下有很多的checkbox,这时候有一种需求就是全部勾选。之前已经有写过Grid下添加checkbox,如下图
遍历数据源来设置checkbox
public
boolean modified()
{
boolean ret;
VendPackingSlipJour m_vpsja;
;
ret = super();
m_vpsja = VendPackingSlipJourAll_ds.getFirst(); // 数据源第一条
while (m_vpsja)
{
VendPackingSlipJourAll_ds.included( true ,m_vpsja, this .value());
m_vpsja = VendPackingSlipJourAll_ds.getNext(); // 数据源下一条
}
VendPackingSlipJourAll_ds.research(); // 刷新一下
return ret;
}
{
boolean ret;
VendPackingSlipJour m_vpsja;
;
ret = super();
m_vpsja = VendPackingSlipJourAll_ds.getFirst(); // 数据源第一条
while (m_vpsja)
{
VendPackingSlipJourAll_ds.included( true ,m_vpsja, this .value());
m_vpsja = VendPackingSlipJourAll_ds.getNext(); // 数据源下一条
}
VendPackingSlipJourAll_ds.research(); // 刷新一下
return ret;
}