Hi All :
Good day, today, I have write a code for GridGroupControl as below:
GridDynamicFilter GridDfilter = new GridDynamicFilter();
gcAcSelect.TableDescriptor.Columns["ac_Select"].MappingName = "Chk";
gcAcSelect.TableDescriptor.Columns["ac_Select"].Appearance.AnyRecordFieldCell.CheckBoxOptions.CheckedValue = "1";
gcAcSelect.TableDescriptor.Columns["ac_Select"].Appearance.AnyRecordFieldCell.CheckBoxOptions.UncheckedValue = "0";
gcAcSelect.TableDescriptor.Columns["ac_pNum"].MappingName = "ProductNum";
gcAcSelect.TableDescriptor.Columns["ac_pNum"].AllowFilter = true;
gcAcSelect.TableDescriptor.Columns["ac_pName"].MappingName = "ProductName";
gcAcSelect.TableDescriptor.Columns["ac_pName"].AllowFilter = true;
GridDfilter.WireGrid(gcAcSelect);
Above code that will show filter bar on Grid Grouping Control, then I create the 2 button which name "select all" and "clear all"
When user click select all, all filtered record will be check
The code as below
private void cmdAcAll_Click(object sender, EventArgs e)
{
foreach (Record rec in gcAcSelect.TableControl.Table.Records)
{
rec.SetValue("Chk", 1);
}
}
My problem is, when user click the select all button, the unfiltered record are also be checked (i.e. Chk value = 1), how can prevent it ?
Pls advice
Thanks
Michael