Henry Olive 5 Posted September 25, 2021 I wish everyone a healthy day. I have a Master-Detail tables (Components : SQLDataset+DSProvider+ClientDataset+D.Source) 2 table's comman field is ID field, Detail Table Primary Keys are ID,LINENO, In my Detail table i have a SQL Command *w/o any ORDER BY clause* But i want to show the detail table's datas in a DBGrid with sorted (ITEMNO) Even though SQLDataset's SortFieldNames=ITEMNO but it doesnt sort How can i show detail table's data in a dbgrid with ITEMNO sorted **without add CommandText ORDER BY ITEMNO clause.** (P.s : If i add commandtext ORDER BY ITEMNO it works ) Thank You Share this post Link to post
Henry Olive 5 Posted September 25, 2021 I solved the problem I wrote just ITEMNO in the sortfieldname instead of OD.ITEMNO ( SortFieldName requires field name *with Alias* in the CommandText) Thank You Share this post Link to post