View Issue Details

IDProjectCategoryView StatusLast Update
0003118JEDI VCL00 JVCL Componentspublic2005-07-28 01:27
ReporterDominikAssigned Toobones 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version3.00 
Target VersionFixed in Version 
Summary0003118: Add Title-Click-Sort-Support for ZEOS-Components in TJVDBUltimGrid
DescriptionHi,

I was just wondering if it would be possible to add simple "on-click-sort-functionality" to the JVDBUltimGrid also for the ZEOS-library.

I managed to add ZEOS-Sorting support like that:

Changed method
procedure TJvDBUltimGrid.Sort(FieldsToSort: TSortFields);

like that:

Add constant
  cIndexFieldNamesZQuery = 'SortedFields';
  
Then changed
"
          SortString := SortString + '[' + FieldsToSort[FTS].Name + ']';
          if FieldsToSort[FTS].Order = JvGridSort_ASC then
            SortString := SortString + ' ASC'
          else
            SortString := SortString + ' DESC';
          if FTS = MaxFTS then
          begin
            if SortWith = swUserFunc then
            begin
              OnUserSort(Self, FieldsToSort, SortString, FSortOK);
              if SortOK then
                FSortedFields := FieldsToSort;
            end
            else
              UpdateProp(cIndexFieldNames, SortString);
"

To

"
          // Is it a TZQuery???
          if IsPublishedProp(DSet, cIndexFieldNamesZQuery) then
            SortString := SortString + FieldsToSort[FTS].Name
          else
            SortString := SortString + '[' + FieldsToSort[FTS].Name + ']';

          if FieldsToSort[FTS].Order = JvGridSort_ASC then
            SortString := SortString + ' ASC'
          else
            SortString := SortString + ' DESC';
          if FTS = MaxFTS then
          begin
            if SortWith = swUserFunc then
            begin
              OnUserSort(Self, FieldsToSort, SortString, FSortOK);
              if SortOK then
                FSortedFields := FieldsToSort;
            end
            else
              // Is it a TZQuery???
              if DataSource.DataSet.ClassName = 'TZQuery' then
                UpdateProp(cIndexFieldNamesZQuery, SortString)
              Else
                UpdateProp(cIndexFieldNames, SortString);
"

It would be great if it would be updated like that - or in a different way - in the CVS, because I don't want to update everytime the source when I upgrade the jvcl and I suppose that other users would like to use sorting-support for non-ADO-components, too.

Thanks,
Dominik

TagsNo tags attached.

Activities

obones

2005-07-28 00:40

administrator   ~0007636

We can't support third party libraries like that.
Besides, why don't you simply derive a component from TJvDBUltimGrid, a component that you use instead of it, and in which you do whatever you need to do with the ZEOS library?

anonymous

2005-07-28 01:18

viewer   ~0007640

Okay you're right. I'll do it on my own in a derived component!

Thanks!

obones

2005-07-28 01:27

administrator   ~0007641

Ok then.
Please note that if you need something changed in TJvDBUltimGrid to help in deriving from it, do not hesitate to ask.

Issue History

Date Modified Username Field Change
2005-07-27 16:03 Dominik New Issue
2005-07-28 00:40 obones Note Added: 0007636
2005-07-28 00:40 obones Status new => feedback
2005-07-28 01:18 anonymous Note Added: 0007640
2005-07-28 01:27 obones Status feedback => resolved
2005-07-28 01:27 obones Resolution open => won't fix
2005-07-28 01:27 obones Assigned To => obones
2005-07-28 01:27 obones Note Added: 0007641