Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Change default option in Custom Filter
posted

Hello!

Now in the Custom Filter the (DBNull) option is by default. Can I change this to be the (Blanks) option by default? 

Parents
  • 34430
    Verified Answer
    Offline posted

    Hello Dognail,

    In order to change the default value of the custom filter dialog, I would recommend handling the BeforeCustomRowFiltersDialog event of the UltraGrid. The event arguments can get you the UltraGrid used for these filter operators and operands by using the e.CustomRowFiltersDialog.Grid property, where ‘e’ is the event arguments.

    From here, you can index into the UltraGrid.Rows collection and set the value of the second cell to your desired value. In this case, the code for this would look like the following:

    //In the BeforeCustomRowFilterDialog event…
    UltraGrid grid = e.CustomRowFiltersDialog.Grid;
    grid.Rows[0].Cells[1].Value = “(Blanks)”;

    I have attached a sample project that demonstrates the above. I hope this helps.

    Please let me know if you have any other questions or concerns on this matter.

    UltraGridDefaultFilterValueDemo.zip

Reply Children
No Data