Checkbox in TsDBGrid column

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #38190
    HeDiBo
    Participant

    There are already a couple of solutions for this in a standard TDBGrid, but they're very bound to the TDBGrid implementation and certainly do not adhere to the AlphaSkin skinning rules: it would be very nice if in a TacColumn I could have a property: ShowCheckBox that's settable to True if the underlying field is a boolean field. It's function should be clear, I suppose.

    Would be a nice addition to the TsDBGrid.

    #59383
    aroberts
    Participant

    Hello,

    Have you checked out the TSMDBGrid? It has that feature (and lots more). Alpha can skin it beautifully (using the third-party feature, of course), and it's totally freeware. It has become my go-to grid.

    #59387
    HeDiBo
    Participant
    'aroberts' wrote:

    Have you checked out the TSMDBGrid? It has that feature (and lots more). Alpha can skin it beautifully (using the third-party feature, of course), and it's totally freeware. It has become my go-to grid.

    I'm lucky enough to be able to use the ExpressQuantumGrid components from DevExpress. DevExpress components are very very well supported in AC. So, if I really need a Checkbox for a boolean field, that's the way to go for me. But ExpressQuantumGrid has an extremely heavy footprint. And I only want a checkbox for a boolean field.

    TSMDBGrid can draw checkboxes for boolean fields, but they are not skinned. Especially in dark skins the grid looks awful.

    Nevertheless I want to thank you for your valued input.

    So, Serge, I still would like a TsDBGrid property ShowBoolAsCheckBox.

    #59408
    Support
    Keymaster

    Sorry, some difficulties exists in implementing of this new feature.

    There are no problems with drawing of checkboxes, but redrawing of cells when table is in Edit mode is not easy.

    #59413
    HeDiBo
    Participant
    'Support' wrote:

    Sorry, some difficulties exists in implementing of this new feature.

    There are no problems with drawing of checkboxes, but redrawing of cells when table is in Edit mode is not easy.

    I found this in StackOverflow:

    https://stackoverflo…box-in-a-dbgrid

    Does the third answer there help you any?

    #59421
    Support
    Keymaster

    Thank you.

    I did something similar, but problem in repainting exists, I will research it more.

    #59431
    HeDiBo
    Participant
    'Support' wrote:

    Thank you.

    I did something similar, but problem in repeating exists, I will research it more.

    I would be more than happy to assist you in your search.

    If you send me the source as it is sofar, I'll try to find a solution.

    #59432
    HeDiBo
    Participant

    I found this forum post, containing an overview of the problems one might encounter:

    http://www.delphigroups.info/2/1/326064.html

    The answer from Lester Hanger shows the difficulties and possible solutions.

    Maybe it would be a good idea to support the TSMDBGrid in AC (like the TcxGrid).

    #59434
    HeDiBo
    Participant

    I found this on SourceForge:

    https://sourceforge.net/projects/sfextdbctrl/

    It contains a TSFDBGridInplaceCheckBox component. An inplace checkbox editor for a Yes/No or True/False field.

    This is the package:

    [attachment=9282:SFExtDBCtrl.zip]

    It still has some quirks, but it looks promising.

    #59438
    Support
    Keymaster

    Hello

    I will send the changed acDBGrid.pas file by PM, something wrong with repainting after checkbox changing there.

    SFExtDBCtrl I will check later.

    #59454
    HeDiBo
    Participant
    'Support' wrote:

    Hello

    I will send the changed acDBGrid.pas file by PM, something wrong with repainting after checkbox changing there.

    SFExtDBCtrl I will check later.

    I have sent you a changed acDBGrid.pas to your e-mail address (support@alphaskins.com). Did you receive it?

    #59455
    Support
    Keymaster

    Changed file is received, thank you.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.