This is a migrated thread and some comments may be shown as answers.

Controls not fire event after cloning

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alejandro
Top achievements
Rank 1
Alejandro asked on 13 Dec 2014, 06:58 PM
I have radgrid with custom telerik controls

i need to add  new row from client side




function AddRow(controlName, multirenlgon) {
 
            var grd = $('#' + controlName); // where controlName is the ID
        
            var tbod = grd[0].rows[0].parentNode;
            var newRow = grd[0].rows[grd[0].rows.length - 1].cloneNode(true);
            tbod.appendChild(newRow);
    
       
            var multi = multirenlgon;
         
            EnviaDato('Add', multi, '', '', '', '');
        }



everything is cloned and append but not Events


can you help me?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 17 Dec 2014, 11:47 AM
Hi David,

I am not sure why you need to add rows in such manner and I am not sure if this could be useful in any scenarios. For adding new rows on client-side I could suggest that you take a look at our online demo for Batch Editing:
Nevertheless, regarding your issue with the events, this is the expected behavior, because the events are attached to the DOM element and cloning an element will not clone the attached handlers. You can take a look at the following forum thread, where you will find how to accomplish such "cloning" of the event handlers:
Once again I want to point out that cloning a row with such approach will not be handled by RadGrid and it will most probably break the control.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Alejandro
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or