59
Views
5
Comments
Solved
[OutSystems Data Grid] Data Grid Sorting Issue (Show text but when sorting i whould like to sort by Order)
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hello, 

I´m having an issue with sorting in Data Grid. My objetive is to show a column with a text value, but when sorting i whould like to sort by other binding attribute. 

In this specific case, i have a Fiscal year and i want to present it  FY2024 Q1.... , FY2025 (Q1 - Q4), and i have  an order for each of them... when sorting i whould like to be sorting by that value and not by the Text value .

Is there any change of achieving this?  

UserImage.jpg
Fábio Batista
Solution

Actually fund the solution.... i was defining the attribute in the wrong way....

column._provider.sortMemberPath = 'FiscalYearOrder';

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @Fábio Batista 

AFAIK the filters are built based on the binding of each column.
However, you can try to check on Wijmo's Flexgrid website if the use case is possible and share an example so it can be easier to adapt and share your attempts. That way you can share the parts where you're struggling so it can be more efficient and collaborative for the community.

Cheers,
GM

UserImage.jpg
Fábio Batista

i'm not able to find any info about this in Wijmo... To be more Clear what i need to do is to Link the column with the text FY2024 Q1.... to another attribute fiscalyearorder so that when the FiscalYear Sort is done, it will be sorted by fiscalyearorder and not by the Text...

UserImage.jpg
Fábio Batista

@Gonçalo Martins  I have funded a sortMemberPath property that is suitable for doing this...

I'm defining the attribute :


var grid = OutSystems.GridAPI.GridManager.GetGridById('GridUsers');

var column = grid.getColumn("Name");

column.config.sortMemberPath = 'Integer';


 

but it still doesn't work well, the ordering is still not carried out by this attribute

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @Fábio Batista 

Can you please share the sample oml and detail what's working and what's not?

Cheers;
GM

UserImage.jpg
Fábio Batista
Solution

Actually fund the solution.... i was defining the attribute in the wrong way....

column._provider.sortMemberPath = 'FiscalYearOrder';

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.