View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003329 | JEDI VCL | 03 Donations | public | 2005-11-28 08:11 | 2006-11-21 04:09 |
Reporter | ultimo | Assigned To | Informatix | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | ||||
Summary | 0003329: JvDBGrid: Added possibility to color column on order | ||||
Description | I make the possibility to color column on ascending and descending order, also new event to trap order. I make a new class but if is good you can merge on good code. | ||||
Additional Information | (Sorry for my english) | ||||
Tags | No tags attached. | ||||
2005-11-28 08:11
|
jvDBGridMax.pas (5,062 bytes) |
|
This can be achieved very simply with the OnGetCellParams event and a bit of code. An example in C++ with JvDBUltimGrid: if (MyDBGrid->SortedFields.Length > 0) { for (int SF=0; SF < MyDBGrid->SortedFields.Length; SF++) if (AnsiSameText(Field->FieldName, MyDBGrid->SortedFields[SF].Name)) { if (MyDBGrid->SortedFields[SF].Order == JvGridSort_UP) Background = mycolor1; // "up" color else if (MyDBGrid->SortedFields[SF].Order == JvGridSort_DOWN) Background = mycolor2; // "down" color break; } } And if you want to trap the click on the title bar, use OnTitleBtnClick. Fred |
|
I'm asking for JvDBGrid and not for JvDBUltimGrid. |
|
JvDBUltimGrid = JvDBGrid + sort and search functions. Your question is related to sorting, so JvDBUltimGrid seems to be the right component to use. The sorting procedure (DoTitleClick) in JvDBGrid is broken and should be removed. There are many bugs inside. The idea behind is wrong and works only in a few situations (not uncommon, but a program is supposed to work 100% of the time, not just with favourable situations). So, use it at your own risk. Fred |
|
Ok, thanks. You can change status to resolved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-11-28 08:11 | ultimo | New Issue | |
2005-11-28 08:11 | ultimo | File Added: jvDBGridMax.pas | |
2006-01-05 08:09 | obones | Summary | Added possibility to color column on order => JvDBGrid: Added possibility to color column on order |
2006-04-04 06:10 | obones | Status | new => assigned |
2006-04-04 06:10 | obones | Assigned To | => Informatix |
2006-06-30 07:29 | Informatix | Note Added: 0009736 | |
2006-10-12 06:56 | Informatix | Status | assigned => feedback |
2006-11-03 08:28 | ultimo | Note Added: 0010411 | |
2006-11-03 09:34 | Informatix | Note Added: 0010413 | |
2006-11-08 03:52 | ultimo | Note Added: 0010421 | |
2006-11-21 04:09 | Informatix | Status | feedback => resolved |
2006-11-21 04:09 | Informatix | Resolution | open => fixed |