The grid is bound to a query that is drawng data fro many tables if that
makes a diference.
Thanks in advance.
Your question is not clear. Do you want to delete the rows in the grid or do
you want to delete the data in the underlying tables?
My suggestion would be to query the source data into a temporary TABLE,
adding a new logical field l_display. Then, base your grid on a query from
your TEMPORARY table, retrieving only the records where l_display = .t.
When the user marks records in the grid and selects delete, the key fields
from your selected records can be looked-up in your temporary table and the
l_display field can be changed to .f. Then, issuing a grid.requery() will
refresh the grid from your temp table, with only the selected records
showing.
Hope this helps.
--
Michael Lenoir
Matrix Solutions, Inc.
mi...@matrixsolutions.com
Sharon Klas <sk...@escape.ca> wrote in message
news:38D3B2FE...@escape.ca...
Sharon
If you would like to keep it simple, consider this;
Assign a Click event of the header column a statement something like this.
WITH ThisForm
.Grid.Column1.Visible = .F
.Grid.Column1.Width = 0
.Refresh()
ENDWITH
This will hide Column1 when the header button is clicked. You may also want
to include a reset button on the form as well.
I also use the header as a command button to set a filter or switch an index
to change the sort order.
Hope this helps.
I need to delete the underlying data. I am looking for a method that gives me
the vales of each of the columns for the selected row in the grid. That way I
can create a query to delete the underlying data.
Thisform.grid.value always returns 0. I need a method that returns the values
for each column in the row that was selected. If you know of a method, please
let me know.
Thanks
Michael Lenoir wrote:
> Sharon,
>
> Your question is not clear. Do you want to delete the rows in the grid or do
> you want to delete the data in the underlying tables?
>
> My suggestion would be to query the source data into a temporary TABLE,
> adding a new logical field l_display. Then, base your grid on a query from
> your TEMPORARY table, retrieving only the records where l_display = .t.
>
> When the user marks records in the grid and selects delete, the key fields
> from your selected records can be looked-up in your temporary table and the
> l_display field can be changed to .f. Then, issuing a grid.requery() will
> refresh the grid from your temp table, with only the selected records
> showing.
>
> Hope this helps.
>
> --
> Michael Lenoir
> Matrix Solutions, Inc.
> mi...@matrixsolutions.com
>
> Sharon Klas <sk...@escape.ca> wrote in message
> news:38D3B2FE...@escape.ca...
Sharon-
The record pointer in the recordsource of the grid will be pointing to the
information.
But, is there a reason why you can't just use the deleted mark of the grid?