Hi,
This is my approach to resolve the issue of listview display on k2 mobile app.
- Add a button and a data label to the form.
- Make sure that the data label literal checkbox is checked, and “prevent xss” is unchecked
- in the click button event add an action to set the properties of the datalabel control
- paste the following code:
<script defer>
if (document.readyState == "complete")
{
const collection = document.getElementsByClassName("grid-content-table zebra-stripes");
for (let i = 0; i < collection.length; i++)
{
collectionti].style.tableLayout = "auto";
}
}
</script>
- add the form to the “System/Application form” folder
- test from k2 workspace mobile app and click the button
- test using developer tools
- you can try the code in expressions but I prefer this
- see the attachment for further explanation
Best Regards,
Bashar Adas.