Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by paw on Dec 18, 2007 19:34
open dhtmlx forum
adding new rows with different cell editors

sir, i would like to ask on how can I add a new row but having different cell editors than the what I have set at first. For example, I set my column types as "ro, ro, ro". However, When I click a button, I want it to add a new row in the same grid with column types such as "price, price, price".

I made a function that is called when a button is clicked. However, it does not add the new row that contains the new column types

function clickedAdd()
{
    grid.setColTypes("price, price, price");
    grid.addRow( "sampleId","0,0,1",0);
}
Answer posted by Support on Dec 19, 2007 01:50
The setColTypes operation change global column settings , which will be applied to all rows, if you need to change column types for specific row only you can use next code

function clickedAdd()
{
    grid.addRow( "sampleId","0,0,1",0);
    grid.setRowExcellType('sampleId',"price");
}