how to compare row by row in every column in DataGrid2?

0
Hello,  I'm a developer using Mendix.   my simple question is "how to compare row by row in every column in DataGrid2?"   col1 col2 col3 col4   a      b       c       d  - first row   a      b      d       e - second row    but all data type are String. so it has possibility to change from a to a' (minor differences) or a to c (major differences)   many people have been used "Grid Cell Styler" in MarketPlace.  that module can apply for my purpose?   
asked
1 answers
0

Hello!

Yes, the "Grid Cell Styler" module from the Mendix Marketplace can be applied for your purpose of comparing rows in a DataGrid2, especially when you're dealing with string data types that might have minor or major differences. This module allows you to apply conditional styling to grid cells based on the values they contain. 

For row-by-row comparison in every column, you would need to:

1. Implement logic to compare cell values across rows. This could involve iterating over the dataset in a microflow or nanoflow, comparing each cell's value in a row with corresponding cells in other rows.

2. Based on the comparison outcome (e.g., minor differences like 'a' to 'a'' or major differences like 'a' to 'c'), set an attribute or marker that indicates the type of difference.

3. Use the "Grid Cell Styler" to apply conditional styling based on the difference markers you've set. For instance, you might use one color to highlight cells with minor differences and another color for major differences.

Keep in mind that implementing the comparison logic might require custom development, as you'll need to account for how you define and detect "minor" versus "major" differences. Once this logic is in place, the "Grid Cell Styler" can be effectively used to visually represent these differences in the DataGrid2.

answered