@tbettinazziaxioma-it

@tbettinazziaxioma-it

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 106 total)
  • Author
    Posts
  • in reply to: Stange empty space between columns #110721

    ========== styles.css ===============

    smart-grid {
    width: 100%;
    height: auto;
    }
    smart-menu {
    height: auto !important;
    }
    body {
    height: 1000px;
    }

     

    I wasn’t able to add a readable html file

    in reply to: Numeric text box – max-length #110719

    It seems to be valid only for float and not for integers.

    Tks

    in reply to: Numeric text box – max-length #110715

    Tks for your help but I wasn’t able to apply it.

    I tried

    document.querySelector(‘#e18042434’).input.setAttribute(‘maxlength’, 4) but also

    document.querySelector(‘#e18042434 input’).setAttribute(‘maxlength’, 4)

    I can use only the id of the smart-numeric-text-box because I’ve many in the same page  with different lengths.

    Could You suggest the correct expression ?

    Tks

    in reply to: Get back modified data #109397

    No further help ?

    Tks

    in reply to: Get back modified data #109379

    I’m waiting for the renewal of the support (it was approuved for the next year budget).

    Looking a little deeper I saw the editEnd event is executed, in effect, but only after the onClick of the button : if I submit the form in onClick of the button data are sent incorrectly because editEnd was not still fired.

    In small testcase I prepared  You’ll see in  simplest way I found the onClick is fired before the editEnd.

    I simply modified the grid/cell-editing example adding a little code as You can see below.

    Could You help me to solve that issue ?

    Tks

     
    <div><!DOCTYPE html></div>
    <div><html xmlns=”http://www.w3.org/1999/xhtml”></div&gt;
    <div><head></div>
    <div>    <title>Grid Cell Editing Demo</title></div>
    <div>    <meta http-equiv=”X-UA-Compatible” content=”IE=edge” /></div>
    <div>    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /></div>
    <div>    <meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0″ /></div>
    <div>    <link rel=”stylesheet” type=”text/css” href=”../../../source/styles/smart.default.css” /></div>
    <div>    <link rel=”stylesheet” type=”text/css” href=”../../styles/demos.css” /></div>
    <div>    <link rel=”stylesheet” type=”text/css” href=”styles.css” /></div>
    <div></div>
    <div></head></div>
    <div><body class=”viewport” onload=”carrelloInit()”></div>
    <div>    <script></div>
    <div>function carrelloInit() {</div>
    <div>const grid = document.getElementById(‘grid’);</div>
    <div>    console.log(“Fatto 1”);</div>
    <div>    grid.addEventListener(‘endEdit’, function (event) {</div>
    <div>    const detail = event.detail,</div>
    <div>        id = detail.id,</div>
    <div>        dataField = detail.dataField,</div>
    <div>        row = detail.row,</div>
    <div>        column = detail.column,</div>
    <div>        cell = detail.cell,</div>
    <div>        data = detail.data,</div>
    <div>        value = detail.value;</div>
    <div>        console.log(“Modified ” + dataField + ” / ” + id + ” / ” + value);</div>
    <div>});</div>
    <div>}</div>
    <div>function confermaCarrello() {</div>
    <div>    console.log(“Carrello confermato”)</div>
    <div>}</div>
    <div></script></div>
    <div><div class=”demo-description”></div>
    <div><h1>Grid Cells Editing</h1></div>
    <div>Click on any cell to begin edit its value. To confirm the changes, press ‘Enter’ or click on another cell or outside the Grid. To cancel the changes, press ‘Escape’.</div>
    <div></div></div>
    <div>    <smart-grid id=”grid”></smart-grid></div>
    <div>    <button id=”b1001105″ class=”cfg-button cfg-button-floating” type=”button” role=”button” onclick=”confermaCarrello();”><span class=”cfg-button-text”>Annulla</span></button></div>
    <div>    <!– scripts –></div>
    <div><script src=”../../../common/data.js”></script></div>
    <div>    <script src=”../../../source/modules/smart.grid.js”></script></div>
    <div><script src=”../../../source/modules/smart.button.js”></script></div>
    <div><script src=”index.js”></script></div>
    <div></body></div>
    <div></html></div>
     

    in reply to: Get back modified data #109377

    Sorry for the mispelling.

    I added document.activeElement.blur() and it didnt work.

     

    in reply to: Get back modified data #109376

    I added

    <span style=”background-color: #ffffff; padding: 0px 0px 0px 2px;”><span style=”color: #000000; background-color: #ffffff; font-family: ‘Consolas’; font-size: 10pt; white-space: pre;”> <span style=”color: #268bd2;”>document</span>.<span style=”color: #268bd2;”>activeElement</span>.<span style=”color: #268bd2;”>blur</span>();</span></span>

    to the operation done by the button but nothing changed.

    May you help me ?

    Tks

    in reply to: Get back modified data #109372

    I applied the suggestion You posted in the reply #109030 and it works but in a special case : when I modify the field and then I click a button outside the grid, the endEdit doesn’t fire and then data are not saved.

    How can I avoid such problem ?

    Tks

    in reply to: Grid editing numbers #109368

    I added

    smart-grid smart-number-input{
    –smart-editor-addon-width: 0px;
    }

    to my css but it doesn’t seem to work.

    What’s wrong?

    Tks

    in reply to: Grid editing numbers #109366

    Yes  but editing the field I see the up and down button I don’t want because when the field is small they take too much space to see the real number.

    I’d like to have a number editing without buttons which are very often useless.

    Tks

    in reply to: ERROR in datagrid #109357

    I do the operation in page onload event.

    Is the grid rendered at that time ?

    How can I verify if it was already rendered ?

    Tks

    in reply to: Data values #109343

    I knew the visible property but in order to make a column visible or not with that property I need to identify at runtime columns which should be visible or not.

    A custom property, if any,  could be a good solution to identify them.

    Tks

    in reply to: Data values #109327

    Is it possible to use custom data also on grid columns and cells ?

    E.G. can I add a data (say data-visible) as a property to a grid colum and read it with js ?

    And with grid cells ?

    Tks

    in reply to: Data values #109322

    Dataset is not described in API or, at least, I didn’t find it.

    Could you provide a link for the explanation of such property ?

    Tks

    in reply to: Table getting back values #109295

    I need back value of all modified cells with some id to distinguish them.

    In your example I don’t understand where can I get the value on the server : const val is a javascript variable not a server one.

    Tks

Viewing 15 posts - 31 through 45 (of 106 total)