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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...