Page 1 of 1

How to use JQGridProviderCells

PostPosted: 16 Aug 2017 19:03
by mrcarver
CG Gurus,

I've am unable to understand how to use the JQGridProviderCells.

Attached is a demo that simply attempts to fill a CGGrid configured for a ProviderType := 'Cells'. The intent is that based on the number of Enrollees, the grid would fill with generic enrollee names. Then the user would provide the respective ages. But you will notice that the grids fails to render the inserted rows.

Please advise as to what I am doing wrong.

Regards,
Monte Carver

Re: How to use JQGridProviderCells

PostPosted: 17 Aug 2017 11:04
by Alexander Bulei
Hi mrcarver,

To work properly with grid, you must set the ServerController.ComInitialization to <> ciNone.

Best Regards.

Re: How to use JQGridProviderCells

PostPosted: 17 Aug 2017 15:40
by mrcarver
Interesting. I would NEVER have guessed that. So, with that change, the demo I sent works. However, I am using ComInitialization = ciNormal in my main application, yet the problem persists.

Any other pointers to look for ?

Regards,
Monte Carver

Re: How to use JQGridProviderCells

PostPosted: 18 Aug 2017 09:59
by Alexander Bulei
Hi mrcarver,

Well, we need the simple testcase project.
Try to reproduce the issue in your demo.

Best Regards.

Re: How to use JQGridProviderCells

PostPosted: 18 Aug 2017 17:15
by mrcarver
Alexander,

Because the CGGrid is so capable and complicated, I have implemented inheritance to configure the CGGrid with defaults on how I use typically use it. This makes it very easy to immediately start implementing business rules. However in this case, which is not typical my defaults are causing issues. I confirmed this by removing the defaults and confirming the dynamic creation of cell values works.

Please examine the following defaults and indicate which one(s) would cause the issue.
Code: Select all
    (aObject as TIWCGJQGrid).JQGridOptions.SelectTopRowOnLoad := false;
    (aObject as TIWCGJQGrid).JQGridOptions.AutoWidth := True;
    (aObject as TIWCGJQGrid).JQGridOptions.AltRows      := True;
    (aObject as TIWCGJQGrid).JQGridOptions.AutoRowNum   := false;
    (aObject as TIWCGJQGrid).JQGridOptions.RowNumbers   := True;
    (aObject as TIWCGJQGrid).JQGridOptions.ShrinkToFit  := True;
    (aObject as TIWCGJQGrid).JQGridOptions.HeaderTitles := True;
    (aObject as TIWCGJQGrid).JQGridOptions.PagerVisible := True;
    (aObject as TIWCGJQGrid).JQGridOptions.TopPager     := True;
    (aObject as TIWCGJQGrid).JQGridOptions.GridView     := True;
    (aObject as TIWCGJQGrid).JQGridOptions.RowNum       := 40;
    (aObject as TIWCGJQGrid).JQGridColumnChooser.MultiSelectDlg := True;
 
    (aObject as TIWCGJQGrid).JQGridNav.CloneToTop       := True;
    (aObject as TIWCGJQGrid).JQGridNav.Add              := false;
    (aObject as TIWCGJQGrid).JQGridNav.Edit             := false;
    (aObject as TIWCGJQGrid).JQGridNav.Del              := false;
    (aObject as TIWCGJQGrid).JQGridNav.Refresh          := false;
    (aObject as TIWCGJQGrid).JQGridNav.Search           := True;
    (aObject as TIWCGJQGrid).JQGridNav.View             := True;

    (aObject as TIWCGJQGrid).JQGridPersist.Enabled      := True;
    (aObject as TIWCGJQGrid).JQGridToolbarSearch.Active := True;


Thank you for the timely support.

Re: How to use JQGridProviderCells

PostPosted: 21 Aug 2017 09:36
by Alexander Bulei
Hi mrcarver,

Because the CGGrid is so capable and complicated


That why I need the reproducible and simple testcase project. Try to reproduce this problem on the project, that you sent (post above), with all your app configuration.

Best Regards.

Re: How to use JQGridProviderCells

PostPosted: 21 Aug 2017 14:47
by mrcarver
Thru trial and and error, I found this line

(aObject as TIWCGJQGrid).JQGridPersist.Enabled := True;

to be the problem. Not sure if this is a bug or not. The point of the last post was hoping you could tell me which property was incompatible with the cell provider.

But, apparently
JQGridPersist.Enabled := True;
is incompatible with a cellprovider.

Regards,
Monte Carver

Re: How to use JQGridProviderCells

PostPosted: 21 Aug 2017 15:50
by mrcarver
FYI,
I miss spoke, the problem is here:

// THIS LINE CAUSES THE CELL PROVIDER TO NOT WORK
JQGridToolbarSearch.Active := True; // IF "True" THEN GRID EMPTY

This strikes me as bug...

Regards,
Monte Carver

Re: How to use JQGridProviderCells

PostPosted: 28 Aug 2017 09:12
by Alexander Bulei
Hi mrcarver,

The issue is fixed in 4.0.1.65.

Thank you.

Best Regards.