Ver Mensaje Individual
  #1  
Antiguo 09-03-2005
Luis Luis is offline
Miembro
 
Registrado: may 2003
Posts: 40
Reputación: 0
Luis Va por buen camino
Índice de cliente

Hola foro, quiero ordenar (ascendente y descendiente) en un dbgrid en tiempo de ejecución (descendiente si vuelve a oprimir la misma columna) para ello utilizo el siguiente código:

procedure Tform1.gridTitleClick(Column: TColumn);
begin
with Column.Grid.DataSource.DataSet as TClientDataSet do
if IndexFieldNames = Column.Field.FieldName then
IndexFieldNames := Column.Field.FieldName + ' desc'
else
IndexFieldNames := Column.Field.FieldName;
end;

obviamente me envia un error de "campo no encontrado" al unir el nombre del campo con 'desc'. Alguien sabe como puedo lograrlo.

Nota:
Estoy trabajando con firebird 1.5 y delphi 7, utilizo dbExpress y ClientDataSet

Responder Con Cita