CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How to use JQGridProviderCells

by mrcarver » 16 Aug 2017 19:03

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
You do not have the required permissions to view the files attached to this post.
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 17 Aug 2017 11:04

Hi mrcarver,

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

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mrcarver » 17 Aug 2017 15:40

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
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 18 Aug 2017 09:59

Hi mrcarver,

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

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mrcarver » 18 Aug 2017 17:15

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.
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 21 Aug 2017 09:36

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mrcarver » 21 Aug 2017 14:47

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
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by mrcarver » 21 Aug 2017 15:50

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
You do not have the required permissions to view the files attached to this post.
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 28 Aug 2017 09:12

Hi mrcarver,

The issue is fixed in 4.0.1.65.

Thank you.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQGrid

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.