Datagrid 2 Reset

0
Hi All   I was wondering if somebody found a nice way to reset the datagrid 2 filters? Now if you have multiple filters enabled you need to manually reset them all when comparing to the ‘old’ datagrid where you had a reset button. This would be quite handy as well to have this option for datagrid 2.0.   Any ideas how to accomplish this?
asked
3 answers
0

Datagrid 1 had a reset button, but somehow they didn’t implement this for datagrid 2.

Upvote this idea: https://forum.mendix.com/link/ideas/2357

answered
0

It's possible but with a little workaround. You have to implement personal settings per datagrid and a refresh of the page is needed:


 



JS_Reload is just and will refresh the screen:

// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";

// BEGIN EXTRA CODE
// END EXTRA CODE

/**
 * @returns {Promise.<void>}
 */
export async function JS_Reload() {
	// BEGIN USER CODE
	mx.reload();
	// END USER CODE
}

 

answered
0

Hi Pim,

 

Thanks for the proposed solution. I will for sure try this at the right time. We already use personal settings for each user, but if I am to reset every field, then I guess they will also lose the sorting order on their columns?

 

Kind regards

answered