How DBGRIDEH implements click on title

xiaoxiao2021-03-06  64

The data source is AdoQuery 1, first set the title-> titlebutton property of the field that needs to be sorted in DBGrideh, set the DGGrideh Optionseh-> DBHAUTOSORTMARKING attribute to True 3, which is judged in the dbgrideh OntitleButtonClick event. procedure Tfrmmain.dbgGridEh1TitleBtnClick (Sender: TObject; ACol: Integer; Column: TColumnEh); begin if column.Title.SortMarker = smdowneh then adoQuery1.Sort: = column.FieldName else adoQuery1.Sort: = column.FieldName 'DESC';

转载请注明原文地址:https://www.9cbs.com/read-86544.html

New Post(0)