I’m currently working on a datagrid with checkboxes, and i’d like to have some of the checkboxes checked already when the page is loaded but unfortunately i can’t find a way to initialize the Datagrid selected row variable.
I’ve tried but doesnt work. Basically Xano shows me which lines should be selected, my workflow is similar as the one you showed me: changing the value of the data grid selected variable with JS and then change page. When i test the workflow it seems to work but nothing changes…
Any idea ?
I’m not sure whether after page change you can execute any javascript this way. If you can, then you might want to look at how the data looks in the datagrid and make your data follow the structure.
If you check this out, I for example have Unique id set to email. So when I check the id it’s actually an email. Might be that you are using an id from xano, but have not bound that same id from xano as Unique id?
That is exactly what i did. That is why i added a JS funciton so the format is the same. Here are the screen of what my datagrid selectedrow looks like and what i’m returning for when i change it’s value. It’s still doesnt change…
The page rotation form is where the datagrid is displayed. I’ve tried changing it before and after changing page it still doesnt work even though it says that the operation succeded, it’s really werid …
I’m sorry to re open this topic, but I’ve tried many times your solution in my project and it still doesnt work…
I’ve done exactly what you’ve showed me, but it seems that on page load the value of the SelectedRow doesnt change, i dont really get why it doesnt work here are a few screen: the first one is what i do with the dump array, the second one is what i do on page load and the third one is the selectedRow variable whenever i select some rows.
I see now, yeah, this is a workaround that works for displaying the selected data, but it seems like the DataGrid has it’s own state, so this doesn’t seem to work, dang… I’m afraid you’ll have to wait for WeWeb team to expose the variable on this one… I see the issue now, and I’m not sure if this is doable in this case.