Jump to content

AJAX ERROR O257


Recommended Posts

4 minutes ago, CITASys Automation said:

JSAddListener

Especially adding a handler for the painted event, you should add it to OnCreate.

6 minutes ago, CITASys Automation said:

after using this code on unimform.show to remove header on dbgrid1, this ajax error appear..

Although adding in this event also works for me.

Link to comment
Share on other sites

procedure TUnimFormSenyiur.UnimFormShow(Sender: TObject);
begin
//UnimDBGrid1.JSInterface.JSAddListener('painted','function(me){me.setHideHeaders(true)}');

UnimDBGrid1.JSInterface.JSConfig('cls', ['customGrid']);

unimpanel2.Left:=(MainmForm.Width div 2) - (unimPanel2.Width div 2);
unimpanel3.Left:=(MainmForm.Width div 2) - (unimPanel3.Width div 2);
unimpanel21.Left:=(MainmForm.Width div 2) - (unimPanel21.Width div 2);
unimDatePicker1.Date:=now;
UpdateDTP;

only this code in onShow events ..

Link to comment
Share on other sites

1 hour ago, Sherzod said:

Ok. We'll try with defer. 

 

4 hours ago, CITASys Automation said:

only this code in onShow events ..

Try this code for test:

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  ...
  with UnimDBGrid1 do
  begin
    JSInterface.JSAddListener('painted','function(me){Ext.defer(function(){me.setHideHeaders(true)}, 500)}');
  end;
end;

 

Link to comment
Share on other sites

×
×
  • Create New...