Jump to content

Set Filtering.Editor.ClearButton = false


gerardocrisci

Recommended Posts

Ciao Sherzod

in unit uniDBGrid

procedure TUniCustomDBGridColumn.InitFilter(C: TJSObject; Fld: TField);

        (FEdit as IUniFormControl).ClearButton := True;

        TUniControlHack(FEdit).LayoutConfig.Width := '95%';

I think it's a solution is to create a property in Column.Filtering or generic .. like UseEditorClearButton stored false

if NOT UseEditorClearButton then
 (FEdit as IUniFormControl).ClearButton := True;

another block to consider a modification is the width property, I would modify the code in

if TUniControlHack(FEdit).LayoutConfig.Width='' then
  TUniControlHack(FEdit).LayoutConfig.Width := '95%';

Grazie

Link to comment
Share on other sites

  • 2 years later...
2 hours ago, Stemon63 said:

any news on setting  properly .ClearButton to false in uniDbgrid column filter editor?

Hello,

One possible solution on the client side:

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) 
{
    columns.forEach(function(col) {
        if (col.fedit) {
            col.fedit.getPlugins().forEach(function(p) {
                if (p.alias[0] == "plugin.clearable") {
                    p.destroy()
                }
            })
        }
    });
}

 

  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...