unidbgrid列排序 1)指定列的.sortable:=true; 2)unidbgrid.columnsort事件添加如下代码: if SameText(Column.FieldName, 'IND_SRC_CODE') then begin if Direction then IndSourceQuery.IndexFieldNames := Column.FieldName + ' asc' else
1.冒泡排序 Delphi/Pascal code ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 procedure BubbleSort(var x:array of integer); var i,j,intTmp:integer; begin for i:=0 to high(x) do begin for j:=0 to high(x)-1 do begin if x[j]>x[j+1] then
procedure TfrmMain.DBGridEhTitleClick(Column: TColumnEh);var i : integer;begin for i:= 1 to DBGridEh.Columns.Count do begin//恢复所有标题字体为默认 DBGridEh.Columns[i-1].Title.Font.Color := clWindowText; DBGridEh.Columns[i-1].Title.Font.Style := []; end; if Que
1. CxGrid汇总功能 ① OptionsView-Footer设置为True,显示页脚 ② CxGrid的Summary选项卡定义要汇总的列和字段名及汇总方式,Footer选项卡定义单个汇总,Default For Groups定义按组汇总.OptionsView-GroupFooters设置为gfAlwaysVisible则显示按组汇总.设置后界面如图. 2. CxGrid的样式设置 当设置了Kind时,NativeStyle必须设置为False,如果指定了Ski
(* * Super Object Toolkit * * Usage allowed under the restrictions of the Lesser GNU General Public License * or alternatively the restrictions of the Mozilla Public License 1.1 * * Software distributed under the License is distributed on an "AS IS&q