TWebDBTableControl paging question

Hi,

I have written a jQuery that changes the styling on the

element inside my table inside .
When I changes pages, the
s are overwritten to display the new relevant database information. This, unfortunately, removes my custom styling.

Is there any way for me to be able to change pages and reapply my custom styling? As if, for example, there were a TWebDBTableControl.afterPageChange() method?

Are you applying style from the OnSelectPage() event?

Hi Bruno,

Thanks for the reply.

I surmised this was the method I needed, but I wasn't able to use it to do what I wanted.

My thought process was that I could do something like the following:

procedure TScheduleTable.WebDBTableControl1SelectPage(Sender: TObject; NewPage: Integer; var Allow: boolean; var DefaultSelect: boolean);
begin
  WebDBTableControl1.Paging.Index:=NewPage;
  DoFunctionOnNewPage();
end;

But this simply does the code before the new page is loaded.

Am I on the right lines, or is this not what the method is for?

This is indeed before the tablecontrol is filled with new data.
You could use the event OnGetCellClass() that is triggered after each cell's value is added and its value is updated.

Thanks for the suggestion, Bruno! I'll have to look into this.

As an aside, I believe there is a bug in VSC concerning this. Starting from a fresh project, I'm unable to assign OnGetCellChildren, OnGetCellClass, or OnGetCellData to any of the grids or tables in the design view; double clicking them just raises the crash message.

They seem to assign fine if done so in code, though.

Going to check, thanks!!

We have found the issue and will release a fix ASAP. Thanks for reporting!

A new release has been published on the marketplace, please, let me know if it fixes your issue. Thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.