Jump to content

SISBLU Software

uniGUI Subscriber
  • Posts

    196
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by SISBLU Software

  1. I discovered the error:
    If you leave this function on, when you enter MEMO and press F5, the system reloads

    procedure TUniForm1.UniFormReady(Sender: TObject);
    begin
    UniMemo1.JSInterface.JSCode(#1'.inputEl.dom.addEventListener("keydown", function(e){e.stopPropagation()});');
    end;

  2. Config:

     

    image.png.84cca5f938e1e6223595800743c367ee.png

     

    If I enter any MEMO and press F5 the system does RELOAD

    If I am OUTSIDE the memo and press F5, then the system CALLS the function

     

    NOT WORK Function

    Ext.onReady(function() {
        document.addEventListener('keydown', (e) => {
            e = e || window.event;
            if (e.keyCode == 116) {
                e.preventDefault();
            }
        })
    });
  3. UnimDBListGrid IS WORK, But I can't do the same thing in DBGRID

     

    UnimDBListGrid CSS:

    .ListView {
        background: white !important;
       border: 3px solid white !important;
       border-style: solid!important;
       box-shadow: 0px 0px 0px white !important;
      }   

    .ListView .x-listitem {
        display: inline-block !important;
          min-width: 25% !important;
       border: 3px solid white !important;
       border-style: solid!important;
       box-shadow: 0px 0px 1px white !important;
      }  

     

    RESULT:

     

    image.png.891d1eb6964267b23a1f71143af95744.png

    DBGRID not WORK

     

    Can someone help me?

     

  4. Hello. How do I divide my grid into 4 columns (25%)? 

    I can do it in UnimDBListGrid using CSS. But in DBGRID the CSS doesn't work

     

    COD. GRID not WORK =

     

    function store.load(sender, records, successful, operation, eOpts)
    {

       var tpl=new Ext.XTemplate(
             '<div>', '<span style="display: inline-block; width: 100px; color: {color}">{itemName}</span>', '<span style="display: inline-block; width: 100px">{price}</span>','</div>;'+
             '<table style="table-layout: absolute;min-width:100%;height:40px;vertical-align:top;'+
             'left:0px;right:0px;top:0px;bottom:0px";'+
             '<tr>'+
              '<td style="border-radius: 8px;vertical-align:top;'+
              'left:1px;right:0px;top:1px;bottom:1px;'+
              'color:white;text-align:center;font-size:20px;'+
              'padding-top:20px; position:absolute;'+
              'background: {[this.getColor(values)]}">{0}</td>'+
               '</tr>'+
             '</table>',
       {
          getColor: function(values)
          {
            if(values[7]=='1') return ' #44db24';
            else return ' #0080FF';
          }
        }
    );
    Ext.defer(function(){
                            
      sender.grid.setColumns([
        {
          text: '',
          dataIndex: '0',
          flex:1,      
          xtype: 'templatecolumn',
          tpl: tpl   
          
          
        }
      ]);
      sender.grid.getColumns()[0].show();
     }, 500); 
    }

     

    Result:

     

    image.png.0cdefc22481bbda78c23b046fbb574cc.png

     

    But I need it like this in 4 columns.
    I was able to do this in UnimDBListGrid, but I can't do it in DBGRID

     

    See in UnimDBListGrid is WORK. It's the same code, but I add CSS to divide the columns

     

    function beforeInit(sender, config)
    {
       config.loadingText='Carregando...';
       config.cls='ListView';
       config.selectedCls=''; 
       
        config.itemTpl = new Ext.XTemplate
      (                                                                 
         
           '<table style="table-layout: absolute;min-width:100%;height:40px;vertical-align:top;'+
            'left:0px;right:0px;top:0px;bottom:0px";'+
            '<tr>'+
              '<td style="border-radius: 8px;vertical-align:top;'+
              'left:1px;right:0px;top:1px;bottom:1px;'+
              'color:white;text-align:center;font-size:20px;'+
              'padding-top:20px; position:absolute;'+
              'background: {[this.getColor(values)]}">{0}</td>'+
               '</tr>'+
          '</table>',
       {
          getColor: function(values)
          {
            if(values[1]=='Aguardando Pag.') return ' red';
            else  if(values[1]=='Pedido Aberto') return ' red'; else return ' #0080FF';
          }
        }
    );  
      
         }

     

    -------CSS

    .ListView {
        background: white !important;
       border: 3px solid white !important;
       border-style: solid!important;
       box-shadow: 0px 0px 0px white !important;
      }   

    .ListView .x-listitem {
        display: inline-block !important;
          min-width: 25% !important;
       border: 3px solid white !important;
       border-style: solid!important;
       box-shadow: 0px 0px 1px white !important;
      }   

     

    image.png.4f4b93e7185978b81cb566e167d7b32b.png

     

     

     

     

  5. Correct:

     

    function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
    {
        columns.forEach(function(col){
            if (col.getEditor() && col.rdonly) {
                col.getEditor().setDisabled(col.rdonly);
            }
        })
    }

     

    Image:

    image.png.12bdf29b321badf514cde542656f055f.png

    Without the code, the columns are active: The 2 COLUMNS are marked as Readonly=true

    image.png.2eae2b64eeba245cbda10a1fac3e0d4b.png

     

  6. hello

    Hi, I downloaded the new version, 1.90.0.1573... And the problem still persists.

    I'm using this function in the GRIDS I need:

    function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
    {
        columns.forEach(function(col){
            if (col.getEditor() && col.rdonly) {
                col.getEditor().setDisabled(col.rdonly);
            }
        })
    }

    But this should be fixed in the component

×
×
  • Create New...