Adding ID and Name for cells

Posted by: sbanerjee on 6 December 2017, 5:31 am EST

    • Post Options:
    • Link

    Posted 6 December 2017, 5:31 am EST

    We are doing automation work and need to fill values in cells. But we are not able to add ID and Name Tag with each cell in the editor. We tried using Xpath but it seems like DOM value changes when we click on the particular cell and hence our automation script fails. Can you please help us in adding ID and Name tag with each cell in editor?

  • Posted 7 December 2017, 8:38 am EST

    Hi,

    You may change cell value using setCellData method. The editor in FlexGrid appears once the cell is in edit mode. You may add ID attribute for the editor by accessing using s.activeEditor property.

    s.activeEditor.setAttribute("id","edit11");
    

    ~Manish

  • Posted 8 December 2017, 7:01 am EST

    We need the ID tag already associated with each cell, after the page renders, not after we click on it and then add the tag.

  • Posted 11 December 2017, 8:08 am EST

    Hi,

    The editor appears on cell editing. Hence, the attributes for editor can be set when cell enters in edit mode.

    If you would like to apply ID attribute for FlexGrid cells, this can be accomplished using itemFormatter. Please refer to the following code snippet for the same.

    grid.itemFormatter=function(panel,r,c,cell){
    	if(panel.cellType==1){
    		cell.setAttribute("id","cell"+r+c);
    	}
    }
    

    ~Manish

Need extra support?

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

Learn More

Forum Channels