Henry Olive 5 Posted March 6, 2022 I wish everyone a healthy day. In object inspector's IndexDefs i created an index ('ITCDINX') for the CDS then i set IndexName to ITCDINX and I wrote Fields = (ITEMCODE;SUBITEMCODE) and Grouping Level=1 then in Fields Editor i selected the field 'ITEMCODE' in field's OnGetText Event i wrote below code procedure TForm1.CDS1ITEMCODEGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin if gbFirst in CDS1.GetGroupState (1) then Text := Sender.AsString else Text := ''; end; I dont get any error msg., my query works well but *all* ITEMCODE's values in DBGrid is empty (No value) all the other values are OK. What am i doing wrong ? Thank You Share this post Link to post