Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Andres on Nov 16, 2009 07:23
open dhtmlx forum
Grid Serialization - Clone Row

Hello,

I am using PRO's Grid serialization to send to the server my xml of a specific grid.

My question comes when adding a row.
I want the cell corresponding to this new row, to have some specific attributes.

Example:

New cell now:
<row id='1'>
<cell></cell>
    <cell></cell>
</row>

New cell wanted:
<row id='1'>
<cell name='column1Name'></cell>
    <cell name='column2Name'></cell>
</row>

Am I able to do this by calling some addRow initializer or function?
Or else, do you have any advises on how to approach this?

Thanks
Answer posted by dhxSupport on Nov 16, 2009 07:39
Answer posted by Andres on Nov 18, 2009 10:19
First of all, thank you for your fast reply.

I checked the link you gave me.
I am trying to use another method:

Copying Row Content

Row content can be copied to another existing row with the help of the following method:

    <script>
grid.copyRowContent(from_row_id, to_row_id);
</script>

Is there an extra method, or variable (boolean for copyAttributes) that also enables the copy of CellAttributes also?
If there isn't, is there an easy way to do this?

Thanks a lot
Andres

 

Answer posted by dhxSupport on Nov 19, 2009 02:41
copyRowContent() method uses CSV serialization to copy row content to the clipboard. Because of CSV format limitation there is no way to copy any additional data except cell's values.