View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002783 | JEDI VCL | 00 JVCL Components | public | 2005-03-20 03:24 | 2005-04-01 06:03 |
Reporter | anonymous | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | 3.00 BETA 2 | ||||
Target Version | Fixed in Version | ||||
Summary | 0002783: TitleClick to select index results in wrong index. | ||||
Description | We often have the primary key as the last field on subsequent keys to make these unique - or fx. having 2 name indexes: Surname: Fields Surname, Lastname Lastname: Fields Lastname, Surname When clicking on the title of a grid the wrong index are selected, because the selector are trying to find the clicked field in any indexes regardles wheither it's the first or second field of an index. | ||||
Additional Information | Fix: function GetIndexOf(AFieldName: string; var AIndexName: string; var Descending: Boolean): Boolean; var I, FieldNo: Integer; IsDescending: Boolean; begin Result := False; FieldNo := 99; for I := 0 to IndexDefs.Count - 1 do begin if (Pos(AFieldName, IndexDefs[I].Fields) > 0) and (Pos(AFieldName, IndexDefs[I].Fields) <= FieldNo) then begin FieldNo := Pos(AFieldName, IndexDefs[I].Fields); AIndexName := IndexDefs[I].Name; // best match so far IsDescending := (ixDescending in IndexDefs[I].Options); Result := True; if Descending <> IsDescending then // we've found an index that is the opposite direction of the previous one, so we return now begin Descending := IsDescending; Exit; end; end; // if we get here and Result is True, it means we've found a matching index but it // might be the same as the previous one... end; end; | ||||
Tags | No tags attached. | ||||
|
And another issue that I don't know how to solve: If the grid is a detail in a master-detail relation - it is possible to click on a title record that misses the MasterFields of the relationship, which results in no records are shown in the grid. |
|
From Fred and Dom: the sorting function in JvDBGrid is very crappy. I didn't remove it because I thought some people could find a use for it, BUT PLEASE DON'T USE IT (and if you do, don't complain). Use JvDBUltimGrid and its sorting function instead. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-03-20 03:24 | anonymous | New Issue | |
2005-03-20 03:50 | anonymous | Note Added: 0006745 | |
2005-03-20 22:47 | jfudickar | Relationship added | related to 0002784 |
2005-04-01 06:03 | obones | Status | new => resolved |
2005-04-01 06:03 | obones | Resolution | open => won't fix |
2005-04-01 06:03 | obones | Assigned To | => obones |
2005-04-01 06:03 | obones | Note Added: 0006816 |