Page 1 of 1

CheckBoxes styling lost

PostPosted: 07 May 2015 10:41
by magosk
Hi!

I discovered a bug in 2.5.0.48 (it worked in 2.5.0.8): if you uncheck the items of a TIWCGJQMCheckButtons in an ajax event handler, they loose their JQM styling. I have not made a full investigation if this relates just to unchecking, or to changing the value etc.

Code: Select all
procedure TMyMobileDialog.FooterIWCGJQMPageFooterToolbarItems1JQMButtonOptionsEventsVClick(
  Sender: TObject; AParams: TStringList);
var
  i: Integer;
begin
  MyCheckButtons.CheckButtons.BeginUpdate;
  for i := 0 to MyCheckButtons.CheckButtons.Count - 1 do
    MyCheckButtons.CheckButtons[i].Checked := False;
  MyCheckButtons.CheckButtons.EndUpdate;
  MyCheckButtons.AjaxReRender;
end;


Best regards

Magnus Oskarsson

Re: CheckBoxes styling lost

PostPosted: 07 May 2015 14:33
by Alexander Bulei
Hi magosk,

Since the property Item.Checked already supports the async change, you don't need call the AjaxReRender.

Best Regards.

Re: CheckBoxes styling lost

PostPosted: 07 May 2015 15:08
by magosk
Hi Alexander and thanks for your quick response! I removed the AjaxReRender call and the visual bug the disappears. When you dynamically delete and add items, should you still use AjaxReRender then?

Best regards

Magnus Oskarsson