CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Tab Close Icon not load

by amirrezaasadpour » 07 Dec 2016 17:27

hi
the tab close icone not load , but when i press F5 , the close icon apears , i am using 3.0.0.99 .
i will send a sample project , please check it , thank you
You do not have the required permissions to view the files attached to this post.
amirrezaasadpour
 
Posts: 8
Joined: 13 Jul 2015 20:39

by Alexander Bulei » 07 Dec 2016 18:15

Hi,

The property CloseIcon doesn't support ajax change.
Please use the AjaxReRender.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by amirrezaasadpour » 08 Dec 2016 10:45

Alexander Bulei wrote:Hi,

The property CloseIcon doesn't support ajax change.
Please use the AjaxReRender.

Best Regards.


i use this code for open frame in new tab
Code: Select all
    var     //open Frame in New Tab
   itab :TIWCGJQTab ;
   Region : TIWCGJQRegion;


begin   //open Frame in New Tab
    iTab := MainTab.AddNewTab ;
    iTab.Caption   := 'حساب هاي گروه' ;
    iTab.CloseIcon := True ;
    iTab.AjaxLoad := True ;   // Required
    iTab.AjaxLoadAlways := True ; // Optional
    iTab.AjaxReRender(True,False);

    Region        := TIWCGJQRegion.Create(Self);
    Region.Name   := CGFindUniqueComponentName(Self,'IWCGJQREGION');
    Region.Parent := iTab ;
    Region.Align  := alClient ;

    //Client
    MainTab.JQTabOptions.AjaxAddTab(iTab.Caption,iTab.TabUrl,iTab.TabIndex);
    MainTab.ActiveTab    := iTab ;

     with TFr_Financ_Group.Create(Region)do
     begin
         Parent := Region ;
         Align  := alClient ;

     end;

     Region.ForceAlign;
     MainTab.Refresh;


end;


and this code for close icon
Code: Select all
  var   //close opened Tab
   itab :TIWCGJQTab ;
   Index:Integer ;
begin  //close opened Tab
     if TryStrToInt(AParams.Values['$Arg_Index'],Index)then
     begin
       iTab := MainTab.Tabs[index];
       MainTab.DeleteTab(Itab);
       MainTab.AjaxReRender(True,False);
       iTab.AjaxReRender(True,False);
     end;

end;


but it dose not work , i also used AjaxReRender in past in Version 3.0.0.61 and it worked good and corectly, but in new Versions it dose not work
thank you
thank you
amirrezaasadpour
 
Posts: 8
Joined: 13 Jul 2015 20:39

by Alexander Bulei » 09 Dec 2016 17:50

Hi amirrezaasadpour,

You have bad usage of AjaxReRender...

Please check changed code below:

delphi code
procedure TMain_Form.IWCGPanelList1IWCGPanelListItems1Click(Sender: TObject;AParams: TStringList);
var
itab :TIWCGJQTab ;
Region : TIWCGJQRegion;
RenderAsync: Boolean;
Frm: TIWCGJQFrame;
begin
RenderAsync:= CGIsCallBackProcessing;
if RenderAsync then
CGCallBackDisableAjaxResponse;
try
iTab := MainTab.AddNewTab;
iTab.Caption := 'Test Caption' ;
iTab.CloseIcon := True ;
iTab.AjaxLoad := True ;
iTab.AjaxLoadAlways := False;

Frm:= TFr_Financ_Group.Create(Region);
Frm.Name:= CGFindUniqueComponentName(Self, 'FinancGroupFrame');
Frm.Parent:= iTab;
Frm.Align:= alClient;
finally
if RenderAsync then
begin
CGCallBackEnableAjaxResponse;
MainTab.AjaxReRender(True,False);
end;
end;
end;


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by amirrezaasadpour » 09 Dec 2016 21:51

thank you very much
amirrezaasadpour
 
Posts: 8
Joined: 13 Jul 2015 20:39


Return to JQTabs

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.