Atozed Forums
IWjQDBGrid auto column width, autosize with - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: IWjQDBGrid auto column width, autosize with (/thread-2371.html)



IWjQDBGrid auto column width, autosize with - Comograma - 04-21-2021

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?


RE: IWjQDBGrid auto column width, autosize with - Alexandre Machado - 04-23-2021

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


RE: IWjQDBGrid auto column width, autosize with - Comograma - 05-03-2021

(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!!


RE: IWjQDBGrid auto column width, autosize with - Comograma - 05-24-2021

This continues not to work properly, even after 15.2.29!!!!!!