How Do I Sort Records By A Specific Key's Values?
You can sort the rows of a data grid form using the SortDataByKey command. Let's look at an example.
This card has a data grid and an option menu. The option menu contains three values that you can sort by: First Name, Last Name and Title.
The code to perform the sort is pretty straight forward.
1) Determine which array key of the data grid form to sort by. This will be one the keys you created when you assigned the dgData. If you used the dgText property then the key will be "Label 1" or "Label 2", etc.
2) Determine the sort type, direction and whether or not the sort is case sensitive.
3) Call the SortDataByKey command.