Have a dot(.) when double click input cell

Posted by: viethdhe130200 on 12 December 2021, 12:15 pm EST

  • Posted 12 December 2021, 12:15 pm EST - Updated 3 October 2022, 12:14 pm EST

    Somebody help me. When i double click to cell to input and there is a dot displayed to the right of cell

    My problem that I want to not display that dot when I input.

    Thank you for reading my question

  • Posted 12 December 2021, 12:35 pm EST - Updated 3 October 2022, 12:14 pm EST

    I think I got the problem. I have attached the following unit. So maybe when I double click to enter it may have resulted in the unit not being able to show up, so having a dot means the width is missing. So how can i hide the unit when i double click to input

    this is my function to add unit :

    addUnit = (cell, unit) => {

    const unitDom = document.createTextNode(

    {unit}
    };

    cell.appendChild(unitDom);

    }

  • Posted 13 December 2021, 8:14 am EST

    Hi,

    If I understand correctly, you are using the format item event to ad the additional node in the cell. If yes, then you may use the editRange property to determine if the grid is in edit mode, if yes, then simply skip adding the text node. You need to use code similar to the following:

    grid.formatItem.addHandler((s, e) =>{
        if(s.editRange && s.editRange.contains(e.row, e.col)){
    	// our edit mode cell, skip
           return;
        }
    
       // perform normal operation and add required text node
      const unitDom = document.createTextNode(`{unit}`};
      e.cell.appendChild(unitDom);
    });
    
    

    If the issue persists, please share a sample that demonstrate the same so that we could investigate the root cause of the issue and assist you accordingly.

    Regards

    Sharad

  • Posted 13 December 2021, 11:37 pm EST

    Thank you for answer sharad.tomer <3

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels