Board index » delphi » moving rows between grids

moving rows between grids

Hi
I have a grid with data based on a ibquery and I want to be able to drop
rows from that grid to another. I assume I have to reopen the first query
without the particular row and open another query with that row for grid 2.
Is there a better way of solving that?

Thanks in advance,
Tove

 

Re:moving rows between grids


Tove <tove.bjornb...@i-design.no> schrieb in im Newsbeitrag:
3bb84fcf$1_1@dnews...

Quote
> Hi
> I have a grid with data based on a ibquery and I want to be able to drop
> rows from that grid to another. I assume I have to reopen the first query
> without the particular row and open another query with that row for grid
2.
> Is there a better way of solving that?

For the grid dragging from, set your
DBGrid.Columns[DraggedColumnIndex].Visble := False after the drop.

Unless you are using a memory table for the grids, I think opening the
second query is easiest.

Cheers,

Kevin

Re:moving rows between grids


Thanks for your answer.
What properties must I set to actually be able to drag a row from one grid
and drop it into another? I tried setting DragMode to dmAutomatic, but it
doesn't work. Could you help me?

Thanks,
Tove

Quote
> For the grid dragging from, set your
> DBGrid.Columns[DraggedColumnIndex].Visble := False after the drop.

> Unless you are using a memory table for the grids, I think opening the
> second query is easiest.

> Cheers,

> Kevin

Re:moving rows between grids


Quote
"Tove" <tove.bjornb...@i-design.no> wrote in message

news:3bb976a4$1_2@dnews...

Quote
> Thanks for your answer.
> What properties must I set to actually be able to drag a row from one grid
> and drop it into another? I tried setting DragMode to dmAutomatic, but it
> doesn't work. Could you help me?

This TI is in need of updating but it points you in the right direction.

http://community.borland.com/article/0,1410,16562,00.html

--
Regards,
Chris Luck

Other Threads