Subject Re: Question : IB_Grid And Multiselect
Author sdbeames
--- In IBObjects@y..., "micarnal" <zorro@d...> wrote:
> I am trying to replace my old DBgrid with IB_Grid and have a
> 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.

This works for me....

// 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