View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003933 | JEDI VCL | 00 JVCL Components | public | 2006-09-29 18:44 | 2006-10-17 05:10 |
Reporter | jay | Assigned To | Informatix | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.20 | ||||
Target Version | Fixed in Version | ||||
Summary | 0003933: JvDBUltimGrid: Add a property "ValidSortColumn" to be able to specify the FieldTypes that may be sorted | ||||
Description | I am using FIB plus with firebird where I have Lookup columns that I want to sort by using the OnUserSort event. If I click on the header of a Column that is of kind fkLookup, it won't even trigger the event. I checked the source code line nos 361-362: if (SortField is TBlobField) or (SortField is TBytesField) or ((SortField.FieldKind <> fkData) and (SortField.FieldKind <> fkInternalCalc)) then and it does not allow for SortField.FieldKind = fkLookup I replaced this code with: if (SortField is TBlobField) or (SortField is TBytesField) or ((SortField.FieldKind <> fkData) and (SortField.FieldKind <> fkInternalCalc) and (SortField.FieldKind <> fkLookUp)) then and it now works fine and the sort is successfully executed. This works fine with the FIB components but not with MyDac components and probably won't work with most data access components. However, since there are some (at least FIB) that do, it would be nice to have a property that can be changed to allow it. The default functionality would be equivalent to the the current code (no lookup sort) to not disrupt its current operation. I hope that I explained myself clearly and that this feature can be added in the near future. Pleas feel free to contact me if you have any doubts. Regards, Jay | ||||
Tags | No tags attached. | ||||
|
Wouldn't it be a better solution to add an event for such behaviour? |
|
It might even already be here... |
|
The affected code is inside the Sort() procedure. The first thing that is being done is to validate if the sort can be done or not. The final validation is to check if the the data type of the column is valid for sorting. Within this validation it does not allow fields of class (TBlobField or TBytesField). If it is not one the previous classes it only allows FieldKind (fkData and fkInternalCalc). If it determines that that sort is invalid, it aborts the sort. Under this condition, other cases may also be viable for sorting (Text Blob fields for example). I understand that for MOST cases, this validation is very logical and is the best default behaviuor. Although an event may be added (?? OnValidSort) where it may return True or False. I think that a property would be simpler to use and probably easier to implement in the component. However, as long as the developer can control this situation, either solution would be wellcome. Regards, Jay |
|
A property may be easier to use, but a event is more flexible, so i vote for the event |
|
Fixed. Soon in SVN. The new event is called OnCheckIfValidSortField and waits for the result of your own checking routine. Fred |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-09-29 18:44 | jay | New Issue | |
2006-10-01 04:04 | jfudickar | Note Added: 0010265 | |
2006-10-02 01:28 | obones | Note Added: 0010270 | |
2006-10-02 09:45 | jay | Note Added: 0010274 | |
2006-10-12 06:47 | Informatix | Status | new => assigned |
2006-10-12 06:47 | Informatix | Assigned To | => Informatix |
2006-10-12 06:50 | Informatix | Status | assigned => confirmed |
2006-10-13 00:42 | jfudickar | Note Added: 0010355 | |
2006-10-17 05:09 | Informatix | Status | confirmed => resolved |
2006-10-17 05:09 | Informatix | Resolution | open => fixed |
2006-10-17 05:09 | Informatix | Note Added: 0010370 |