var
I:
Integer;
sLine:
string;
begin
with
TcxGridDBTableView(Sender)
do
begin
if
not
Assigned(DataController.DataSet)
then Exit;
if
DataController.DataSource.State
<>
dsBrowse then
Exit;
try
for
I
:=
0
to
ColumnCount
-
1 do
with
Columns[I] do
begin
sLine
:=
Format('%0.2d',
[SortIndex])
+ DataBinding.FieldName;
case
SortOrder of
soAscending:
TUserDataSet(DataController.DataSource.DataSet).SortDataSetByFieldName(DataBinding.FieldName,False);
soDescending:
TUserDataSet(DataController.DataSource.DataSet).SortDataSetByFieldName(DataBinding.FieldName,True);
end;
end;
finally
end;
end;
begin