Atozed Forums

Full Version: IWjQDBGrid auto column width, autosize with
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using a IWjQDBGrid to show some data.
I have the options goAutoGridWidth and goAutoColumnWidth set to True.
When the page 1st shows, the grid is auto adjust to the width of the browser and the columns are auto width also.
If I resize the browser's page, I would that the grid would stay or do an autowidth do the new browser width and also the auto column width is refreshed.

How can I accomplish this?
I believe you are resizing the grid when the page is also resized, is that correct?

I think you will need to work with OnAsyncResize event of the form and reset the grid auto width property. I'll see if I can put a demo together... hold on
(04-23-2021, 07:57 PM)Alexandre Machado Wrote: [ -> ]I believe you are resizing the grid when the page is also resized, is that correct?

I think you will need to work with OnAsyncResize event of the form and reset the grid auto width property. I'll see if I can put a demo together... hold on

Yes, correct.
On OnAsyncResize event of the form I'm doing:
  IWjQDBGrid1.Options := IWjQDBGrid1.Options - [goAutoGridWidth, goAutoColumnWidth];
  IWjQDBGrid1.Options := IWjQDBGrid1.Options + [goAutoGridWidth, goAutoColumnWidth];
  //IWjQDBGrid1.RefreshData; // tried this
  //IWjQDBGrid1.RefreshAsyncRender; // tried this

I think the event doesn't fire up!!
This continues not to work properly, even after 15.2.29!!!!!!