function Comparison(Left, Right : TCollectionItem; var Data) : integer;
private
function TTestForm.Comparison(Left, Right : TCollectionItem; var Data) : integer;
begin
Result := comparestr(TIWCGJQCheckBoxItem(Left).Caption,TIWCGJQCheckBoxItem(Right).Caption);
end;
TestCheckBoxList.Items.SortItems(Comparison);
Statistics: Posted by GerritS — 03 Dec 2018 14:40
Statistics: Posted by Alexander Bulei — 29 Nov 2018 10:12
Statistics: Posted by GerritS — 26 Nov 2018 17:29
Statistics: Posted by Alexander Bulei — 14 Feb 2018 10:35
Statistics: Posted by mrcarver — 13 Feb 2018 20:31
And what should I add in your code to save the item's index and/or caption (not only value)? Is that possible?
Can I as a programmer prevent checking/unchecking some item (not with disabling it)? Let's say for example at least one item among enabled items should always remain checked.
function (event, ui){
if (ui.value == 'op1'){
return false;
}
}
Statistics: Posted by Alexander Bulei — 21 Mar 2017 16:52
Statistics: Posted by yocko — 21 Mar 2017 15:22
procedure TIWForm1.IWCGAppFormCreate(Sender: TObject);
begin
with IWCGJQCheckBoxList1.JQCheckBoxListOptions.OnClick.BrowserParams.Add do
begin
ServerName:= 'checked';
BrowserScript:= 'ui.checked';
end;
with IWCGJQCheckBoxList1.JQCheckBoxListOptions.OnClick.BrowserParams.Add do
begin
ServerName:= 'value';
BrowserScript:= 'ui.value';
end;
end;
procedure TIWForm1.IWCGJQCheckBoxList1JQCheckBoxListOptionsClick(Sender: TObject; AParams: TStringList);
var
LCheckedVal: string;
begin
LCheckedVal:= AParams.Values['value'];
end;
Statistics: Posted by Alexander Bulei — 21 Mar 2017 12:18
Statistics: Posted by yocko — 20 Mar 2017 20:47
Statistics: Posted by Alexander Bulei — 11 Nov 2016 13:18
Statistics: Posted by MCarver — 09 Nov 2016 17:07
Statistics: Posted by Alexander Bulei — 17 May 2016 16:16
Statistics: Posted by RobertoLopes — 17 May 2016 15:36