Sorting a Datagrid Column
Posted: Mon Feb 27, 2017 11:47 am
I am developing the the front end to a database that accesses more than 3000 documents that begin in 1950 and continue to the present year, named in the following format:
item 1: the last two digits of the year of publication and the order of publication in that year as a four-digit number, e.g., 14-1004
item 2: the acronym of the agency to whom the document is addressed, e.g., DRT
item 3: the subject of the document
Example of full name: 14-1104 DRT Gross Receipts Tax
Example correct ascending order:
55-1111 DOA Claim for Damage
88-2233 DPS Vehicle Accident
00-4441 DRT License Fees
14-7878 CQA Inspection Fees
I have entered the data into a three-column datagrid table. I want the order to be chronologically correct, but the default ascending sort puts the list as follows: "00-" up to "17-" and then "50-" and so on up to "99-". I want the correct chronological order, both ascending and descending.
Since I can't change the naming convention, can a script be written that accomplishes this? I'm not asking for anyone to write it, but need to abandon the use of the datagrid if it is probably or clearly not possible. If it is possible, I'll will work on it until I discover how. Thank you for your suggestions.
Monty
item 1: the last two digits of the year of publication and the order of publication in that year as a four-digit number, e.g., 14-1004
item 2: the acronym of the agency to whom the document is addressed, e.g., DRT
item 3: the subject of the document
Example of full name: 14-1104 DRT Gross Receipts Tax
Example correct ascending order:
55-1111 DOA Claim for Damage
88-2233 DPS Vehicle Accident
00-4441 DRT License Fees
14-7878 CQA Inspection Fees
I have entered the data into a three-column datagrid table. I want the order to be chronologically correct, but the default ascending sort puts the list as follows: "00-" up to "17-" and then "50-" and so on up to "99-". I want the correct chronological order, both ascending and descending.
Since I can't change the naming convention, can a script be written that accomplishes this? I'm not asking for anyone to write it, but need to abandon the use of the datagrid if it is probably or clearly not possible. If it is possible, I'll will work on it until I discover how. Thank you for your suggestions.
Monty