Recent

Author Topic: Column width with two WDataGrid. Pas2JS_Widget  (Read 206 times)

rca

  • Jr. Member
  • **
  • Posts: 97
Column width with two WDataGrid. Pas2JS_Widget
« on: February 18, 2025, 05:41:17 am »
I have a Button WButton1 and two DataGrids (WDataGrid1 and WDataGrid2).

I load the respective data in the procedure TWForm1.FormCreate

Code: Pascal  [Select][+][-]
  1. WDataGrid1.Data := jData1;
  2. WDataGrid2.Data := jData2;

And they work and display correctly.

I want to change the width of the first column of the WDataGrid2 with:

Code: Pascal  [Select][+][-]
  1. procedure TWForm1.WButton1Click(Sender: TObject);
  2. begin
  3.   WDataGrid2.Columns[0].Width := 20;
  4. end;

However, it also affects the width of the first column of the WDataGrid1.

rca

  • Jr. Member
  • **
  • Posts: 97
Re: Column width with two WDataGrid. Pas2JS_Widget
« Reply #1 on: February 18, 2025, 09:54:55 pm »
I attach a simple test program, which even if you only want to modify the width of the first column
of WDataGrid2, visually the same change is also reflected in WDataGrid1.

Please, can someone help me?


 

TinyPortal © 2005-2018