Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setup IWGrid visibility in OnAsyncClick event
#1
Hi

Simple bug in IW15.1.4, but very annoying.
OnAsyncClick Event:
                        IWGrid1.visible: = not IWGrid1.visible;
... and the position of the Grid is moving!
(The position is correct for the OnClick event.)

Other components have no such error.

Error presentation:
http://95.140.46.153/gridvisibletest


Can you help me with this?


Best regards
brsoft

Code:
type
  TIWForm1 = class(TIWAppForm)
    IWGrid1: TIWGrid;
    IWButton1: TIWButton;
    IWButton2: TIWButton;
    procedure IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);
    procedure IWButton2Click(Sender: TObject);
  public
  end;

implementation
{$R *.dfm}

procedure TIWForm1.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);
begin
IWGrid1.Visible:=not IWGrid1.Visible;
end;

procedure TIWForm1.IWButton2Click(Sender: TObject);
begin
IWGrid1.Visible:=not IWGrid1.Visible;
end;



Attached Files
.zip   gridvisibletest.zip (Size: 5.37 KB / Downloads: 0)
Reply
#2
Hi

Unfortunately, we had to go back to IW15.0.24.

What will you do with the error?
1. "It's Not a Bug, It's a Feature." This is how it will work in the future.
2. The next version is expected to fix the problem.

Hope I get an answer ...

regards
brsoft
Reply
#3
Please update to IW 15.1.5 which fixes this and other rendering issues after an Async event.

https://www.atozed.com/2019/09/intraweb-15-1-5/
Reply
#4
Hi Alexandre,
Thank you for your help, but I have a new question.
I don't understand why the HTML code changed:

IW15.1.4:
Code:
<div CLASS="tblpanel tbllist" ID="MENUGRID" style="overflow-x: auto; overflow-y: auto; "><table cellpadding="0" cellspacing="0" id="TBLMENUGRID" style="">
<thead></thead>
<tbody>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu1</td></tr>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu2</td></tr>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu3</td></tr>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu4</td></tr></tbody></table></div>

IW15.1.5:
Code:
<div CLASS="tblpanel tbllist" ID="MENUGRID" style="overflow-x: auto; overflow-y: auto; "><div style=""><table cellpadding="0" cellspacing="0" id="TBLMENUGRID">
<thead></thead>
<tbody>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu1</td></tr>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu2</td></tr>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu3</td></tr>
<tr><td class="okmenuitem" style="white-space: nowrap; height: 24px; "> Menu4</td></tr></tbody></table><script data-type="iw" nonce="ea3sd5wF7k7Ggc1Al/7JT/tOxgs" type="text/javascript">
var tbl = IW.$("TBLMENUGRID");
if (tbl) {
    tbl.style.cssText += tbl.style.cssText;
  }
</script></div></div>


We had to modify some javascript slightly, but it was not significant.
TBLIWGRID's parentNode is not an IWGRID but an anonymous div.

I tried to make a demo, but I couldn't make an example. In our recompiled applications, however, every grid has this HTML code.
Which setting does this?

best regards
brsoft
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)