Blogs

Blogs

DevExpress XtraReports - Add Clear Action To Dynamic Look Up List Parameters

29th March 2016

Scenario

By default when adding a dynamic list look up parameter to an XtraReport at design time by assigning the parameter to your data source, when you rub the report and select a parameter there is then no way to clear the parameter field without having to close and reopen the report. We thought this wasn’t user friendly so after some research we found a solution to add a Clear action to each parameter to clear the selection within the parameter field.

 Solution

To add the Clear action to each parameter we had to create a script within the report to handle the Parameters Request Before Show event. Within the event we create an EditorButton and add it to the parameters LookUpEditor. We then impelement our EditorButtons OnClick event to clear the LookUpEditors EditValue and ItemIndex, which in turn clears and refreshes the parameter value.

This website uses cookies to provide the best possible experience. By continuing to use our website you are agreeing to our use of cookies.