CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQMenu with default TIWCGJQMenuItem.OnClick.Ajax=True

by kattunga » 04 Oct 2013 13:24

Hi,

TIWCGJQMenu creates MenuItems with TIWCGJQMenuItem.OnClick.Ajax=False by default.
Is there any property in TIWCGJQMenu to change this behavior?

The problem is when TIWCGJQMenu creates MenuItems from a standard VCL TMainMenu, because I need to loop through the MenuItems before rendering the page to change every automatically created TIWCGJQMenuItem.OnClick.Ajax to True.

With best regards
Christian
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03

by Jorge Sousa » 04 Oct 2013 14:05

Hi Christian

As it is, is the only way, sorry, we cannot change it anymore without breaking users code.

Regards
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by kattunga » 04 Oct 2013 15:36

No problem. I use the following code and works fine:

Code: Select all
procedure TFPrincip.IWCGJQMenu1Render(Sender: TObject);
  procedure SetAjaxTrue(submenu: TIWCGJQMenuItems);
  var
    i: integer;
  begin
    for i := 0 to submenu.Count-1 do begin
      submenu.Items[i].OnClick.Ajax := True;
      SetAjaxTrue(submenu.Items[i].SubItems);
    end;
  end;
begin
  SetAjaxTrue(IWCGJQMenu1.MenuItems);
end;


Regards
kattunga
 
Posts: 83
Joined: 01 Oct 2013 19:03


Return to JQMenu

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.