Thanks a lot Mr Kulwant Singh for you time to write this. Yes a lot of people suggest that thing, but if I use that method, meaning that we cannot do dragging like in Excel.. so that if possible, I don't want to add another field to put the checkbox or use the delete mark. anyway thanks a lot.. I appreciate your reply :)
Thanks,
Ursula
> > Hi all,
> >
> > Do you know how to select multiple rows in the grid? Is there another way if I don't want to add a field with checkbox? So I want to allow the user to drag the rows that they want to delete (something like microsoft excel). I tried to search it and actually i got an interesting article from
http://www.tek-tips.com/faqs.cfm?fid=433. But to be honest I am not really expert in Foxpro and I don't know how to add properties in the grid. So when I tried that coding, I found error message because I put the properties in the form instead of in the grid. So stupid right :( so I am waiting your help about select multiple rows in the grid.
> >
> > Thanks all
> >
> > Ursula
>
> One simple but not very elegant way is to use the 'Delete Mark' of the grid (ie The leftmost small column of the Grid) You can let the user click this column to mark a record for Deletion. The user can mark all the records he/she wants deleted. You will need to put a command button on the FORM.
> In the click event of this command button you can put code to 'Pack' the recordsource of the grid and refresh the grid.
>
> Another option is to add a special logical (true/false) column to the recordsource of the grid.
> In the grid you can replace the textbox with a Checkbox for this column which will serve the same purpose as a Delete Marker. You can put code in the click of the command button to Delete All records in the recordsource of the Grid which have been selected by the user and then pack the recordsource of the grid and refresh the grid.
>
>
> Other Experts will surely provide you with more elegant solutions!
>
> kulwant