Board index » delphi » TDBGrid dgEditing and dgMultiSelect

TDBGrid dgEditing and dgMultiSelect

D5

I have a DBGrid that I want to be able to multiselect rows and to be
able to edit records. dgRowSelect is false. When I set dgEditing in
code I see strange behavior with some datasets (only one rec can be
edited, can't move to other recs and when you click on the grid the
highlighted rec moves one down). You  can't use dgEditing in
conjunction with dgMultiSelect? If so why?

___
Michael E. Fullerton | The Delphi Compendium
http://www.{*word*104}-matrix.com/delphi.htm

 

Re:TDBGrid dgEditing and dgMultiSelect


Quote
Michael Fullerton wrote:
> You  can't use dgEditing in
> conjunction with dgMultiSelect? If so why?

Probably because nobody ever thought about doing it<G>.
Seriously, I'm not sure what that would mean. If you select
multiple rows, and attempt to modify one field, does that mean
you want that field to be changed in all the selected records?
I'm not sure how to implement that, short of a lot of code to
walk through all the bookmarks and update each row as you go.

Good luck.

Kurt

Re:TDBGrid dgEditing and dgMultiSelect


"Kurt Barthelmess (TeamB)" <KBarthelm...@compuserve.com> wrote:

Quote
>Michael Fullerton wrote:

>> You  can't use dgEditing in
>> conjunction with dgMultiSelect? If so why?

>Probably because nobody ever thought about doing it<G>.

MS Access could do this from at least v2. You don't have to hit a
button to switch from multi-select capable to editable which is what
you seem to have to do in Delphi.

Quote
>Seriously, I'm not sure what that would mean. If you select
>multiple rows, and attempt to modify one field, does that mean
>you want that field to be changed in all the selected records?

No, I don't need both operations at the same time.  What I need is a
grid where you can select multiple rows for example to delete on one
occasion yet be still able to edit individual records later using the
same grid. IOW I want a simple user-friendly for for users to edit
tables.

___
Michael E. Fullerton | The Delphi Compendium
http://www.{*word*104}-matrix.com/delphi.htm

Re:TDBGrid dgEditing and dgMultiSelect


Hello Michael,

Why do you set dgEditing by code at runtime? It may cause many updates in
the grid. How about the ReadOnly property?

What dataset do you use?

--
Andrei Fomine.
DbAltGrid allows multi-line layout and RTF text in a DBGrid descendant.
http://www.quasidata.com/

Quote
"Michael Fullerton" <cmat...@spamkiller-remove.home.com> wrote in message

news:3a43f64e.24526517@forums.borland.com...
Quote
> D5

> I have a DBGrid that I want to be able to multiselect rows and to be
> able to edit records. dgRowSelect is false. When I set dgEditing in
> code I see strange behavior with some datasets (only one rec can be
> edited, can't move to other recs and when you click on the grid the
> highlighted rec moves one down). You  can't use dgEditing in
> conjunction with dgMultiSelect? If so why?

> ___
> Michael E. Fullerton | The Delphi Compendium
> http://www.{*word*104}-matrix.com/delphi.htm

Re:TDBGrid dgEditing and dgMultiSelect


Quote
"Quasidata" <quasidataATquasidataDOTcom> wrote:
>Hello Michael,

>Why do you set dgEditing by code at runtime? It may cause many updates in
>the grid. How about the ReadOnly property?

dgEditing is set so users may edit records depending on security used.
The ReadOnly property is sometimes set depending on security used.
Right now I'm having the before-mentioned problems only with Admins
where the ReadOnly property is not set for any dataset.

Quote
>What dataset do you use?

Several, what does that matter?

Quote
>"Michael Fullerton" <cmat...@spamkiller-remove.home.com> wrote in message
>news:3a43f64e.24526517@forums.borland.com...
>> D5

>> I have a DBGrid that I want to be able to multiselect rows and to be
>> able to edit records. dgRowSelect is false. When I set dgEditing in
>> code I see strange behavior with some datasets (only one rec can be
>> edited, can't move to other recs and when you click on the grid the
>> highlighted rec moves one down). You  can't use dgEditing in
>> conjunction with dgMultiSelect? If so why?

>> ___
>> Michael E. Fullerton | The Delphi Compendium
>> http://www.{*word*104}-matrix.com/delphi.htm

___
Michael E. Fullerton | The Delphi Compendium
http://www.{*word*104}-matrix.com/delphi.htm

Other Threads