Filtered Data Grid ignores Interactions

Drew shared this question 4 years ago
Answered

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)

photo
1

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.

photo
1

Hi Drew,


This tutorial explains the star part: http://www.justinmind.com/support/use...


Please send the .vp file to jim dot support at justinmind dot com so I can figure out the way to make your prototype work.


Best,


Marc

photo
1

Ok. I emailed the file. To see my issue, go to the Email Inbox screen and click the menu on the top right. Then click "starred." Thanks!

photo
1

I continue to run into this same issue. This project is a trial and I am evaluating Justinmind Prototyper, Axure, and Invision to see which one our company should purchase. Any help appreciated.

photo
1

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.