Subject | Re: Question : IB_Grid And Multiselect |
---|---|
Author | sdbeames |
Post date | 2002-07-10T05:24:41Z |
--- In IBObjects@y..., "micarnal" <zorro@d...> wrote:
// Added to allow deselection of selected rows in grid!
void __fastcall TItemsForm::ItemsGrid1CellClick(TObject *Sender, int
ACol,
int ARow, TMouseButton AButton, TShiftState AShift)
{
if (AButton == mbLeft && !AShift.Contains(ssShift) && !
AShift.Contains(ssCtrl))
DMod->ItemsQry1-> SelectAll(false);
}
//--------------------------------------------------------------------
-------
HTH,
Steve
> I am trying to replace my old DBgrid with IB_Grid and have aThis works for me....
> question. I can select multiple rows by using the CTRL or SHIFT key
> and clicking the rows.
> My problem is how do I un-select the selected rows? With DBGrid if
> I click on any other row, all selected rows are un-selected.
// Added to allow deselection of selected rows in grid!
void __fastcall TItemsForm::ItemsGrid1CellClick(TObject *Sender, int
ACol,
int ARow, TMouseButton AButton, TShiftState AShift)
{
if (AButton == mbLeft && !AShift.Contains(ssShift) && !
AShift.Contains(ssCtrl))
DMod->ItemsQry1-> SelectAll(false);
}
//--------------------------------------------------------------------
-------
HTH,
Steve