Hi,
I want to use a custom sorting on a column, but in the function OnCellCompare() the value of Cell1.ColIndex and Cell2.ColIndex do not correspond to the NxColumn6.Index.
Is there a way to find the column based on the INxCell?
Thank you!
Posted 19 November 2020 - 01:47 PM
Hi,
I want to use a custom sorting on a column, but in the function OnCellCompare() the value of Cell1.ColIndex and Cell2.ColIndex do not correspond to the NxColumn6.Index.
Is there a way to find the column based on the INxCell?
Thank you!
Posted 25 November 2020 - 04:08 PM
I was a bit struggling with this one, but I found a solution by using the Cell1.ComputedLocation:
procedure TfrmMain.NxGrid6CellCompare(Sender: TObject; Cell1, Cell2: INxCell; var Compare: Integer); begin if Cell1.ComputedLocation.X = NxTextColumn.Position then begin ...
Posted 25 November 2020 - 05:02 PM
Hi,
I didn't have yet time to see why it failed in first case. I will try it today, in meanwhile you can use ComputedLocation even though is slower.
Posted 27 October 2023 - 10:36 AM
Hello,
I still have the same problem with NextSuite 9.2023
.CollIndex doesn't give the good value but it's the same problem with .RowIndex. So it's a bit difficult to know what I need to compare. At the moment I need to analyse the string in the cell, to cut it in small pieces to make my own sort but it's not a good method.
Do you plan to correct those problems ?
Thank you for your answer
Alexandre Boisramé
Posted 27 October 2023 - 10:57 AM
Hello Alexandre,
Please just use ComputedLocation property of the cell.
I hope this helps.
Posted 27 October 2023 - 12:33 PM
Hello Alexandre,
Please just use ComputedLocation property of the cell.
I hope this helps.
I will do it but it's not obvious that ComputedLocation.X gives .ColIndex and ComputedLocation.Y gives .RowIndex
Have a good day
Alexandre Boisramé
Posted 27 October 2023 - 02:01 PM
Hello,
Yes, Y parameter gives a row index. I will also write this inside the documentation.
0 members, 0 guests, 0 anonymous users