Jump to content
Serge_G

Livebinded Lists and FillBreakGroups collection

Recommended Posts

Hi,

Pushing limits of TListBox and TListView I am testing FillBreakGroups collection (you can see my firsts steps here).

Ok, that works fine was my first thoughts.

 

Writing a new tutorial about list and livebindings, I create a new project and saw that using synchronize link and FillBreakGroups does not work :classic_sad: is this not supposed to or is this a bug ?

note : my tests are only on 10.3.2 version

Share this post


Link to post

You have one linked to my blog post. To see the behavior that I denounce, you only have to use livebindings editor and synchronize,accepting link change, and renaming this new link  (not fair hu ?) 

On the other hand, i am working on another sample (using the well-known biolife.cds) but it is not ready yet, mainly because i have some other functionalities (i.e. custom search)

Here some screenshots (capture and capture_1 without synchronization, last one with synchronization) , same code 

 

procedure TMainForm.rdbListBoxChange(Sender: TObject);
var AFillBreakGroup : TFillBreakGroupItem;
begin
LinkListBoxGroup.Active:=False;
if TRadioButton(Sender).IsChecked then
 begin
   case TRadioButton(Sender).tag of
     0 : begin
          LinkListBoxGroup.FillBreakGroups.Clear;
          LinkListBoxGroup.FillBreakFieldName:='';
          LinkListBoxGroup.FillHeaderFieldName:='';
          ClientDataSet1.IndexFieldNames:='';
         end;
     1 : begin
          LinkListBoxGroup.FillBreakGroups.Clear;
          LinkListBoxGroup.FillBreakFieldName:='Category';
          LinkListBoxGroup.FillHeaderFieldName:='Category';
          ClientDataSet1.IndexFieldNames:='Category';
         end;
     2 : begin
          ClientDataSet1.IndexFieldNames:='Length (cm)';
          LinkListBoxGroup.FillBreakFieldName:='Length (cm)';
          LinkListBoxGroup.FillHeaderFieldName:='';
          // créer les groupes
          aFillBreakGroup:=LinkListBoxGroup.FillBreakGroups.AddItem;
          AFillBreakGroup.MinValue:='0';
          AFillBreakGroup.MaxValue:=30.ToString;
          AFillBreakGroup.DisplayText:='Petits';

          aFillBreakGroup:=LinkListBoxGroup.FillBreakGroups.AddItem;
          AFillBreakGroup.MinValue:=30.ToString;
          AFillBreakGroup.MaxValue:=60.toString;
          AFillBreakGroup.DisplayText:='Moyens';

          aFillBreakGroup:=LinkListBoxGroup.FillBreakGroups.AddItem;
          AFillBreakGroup.MinValue:=60.ToString;
          AFillBreakGroup.MaxValue:=90.ToString;
          AFillBreakGroup.DisplayText:='Gros';

          aFillBreakGroup:=LinkListBoxGroup.FillBreakGroups.AddItem;
          AFillBreakGroup.MinValue:=90.ToString;
          AFillBreakGroup.DisplayText:='Enormes';
         end;
   end;
 end;
LinkListBoxGroup.Active:=True;
end;

 

Capture.PNG

Capture_1.PNG

Capture_2.PNG

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×