Filtered Data Grid ignores Interactions

BACKGROUND: I am building out an email system with a data master of emails that includes attributes such as To, From, EmailAddress, Date, Body, etc. I also have several attributes primarily for filtering data grids (read = true/false, starred = true/fales, status = inbox/draft/sent/trash/deleted). I then use the same *read* and *starred* attributes in onPageLoad events to change styling and show/hide the star. All of this works great.

THE PROBLEM: when I "Set Value" of a Data Grid using a Filter. As soon as I do that, it appears to ignore the styling and show/hide star interactions.

FUTILE ATTEMPTS: I have tried with the filtering interactions both before and after the styling interactions. I have tried the filter and the styling on different objects in the hierarchy (e.g. grid, row, cell, image). I have tried different event listeners (e.g. onClick, onPageLoad, etc.). I have even tried setting a variable, reloading the page, and filtering based on the variable.

I know that my data grid remains correct, because if I add checkboxes for the booleans they display as expected; and if I remove the filter my styling magically reappears. Any help is appreciated.

Comments (5)

UPDATE: when the filter is applied before the styling interactions, those interactions actually take effect - however - instead of applying the styling based on each row's attributes, it applies the styling to all rows based on the attributes from the first row.

FIXED IT: For some reason, if you place the filter on the row (which I did), you'll get the unexpected results I mention above. Simply moving the filter to the Screen as an onPageLoad event fixed everything for me. Here's how it works:

Click on the Inbox Screen in the Screens Menu and add an onPageLoad event When variable Filter=starred {

Set Value [ Filter[ MessageDataMaster( starred=true )

}

NOTE: clicking outside the canvas will NOT work--that will just give you a "no items selected" message. That had lead me to believe you couldn't add events to a page.

Add an onPageLoad event to Row_1 of your Data Grid:

When Select[ Row_1, Read ] = false {

Change Style of Row_1, background = white

}

Add an OnTap event to the button (or menu item, or whatever you want to apply the filter) with the action - Set Value of variable Filter="starred"

Add another OnTap action to that same button: Link to Inbox (this will simply reload the same page, at which time the onPageLoad event from step 1 will take place!)

Although I'm happy to have discovered the fix, I am sad to say I received no support from Justinmind.