Need inputs on calling jquery from angular2

24 views
Skip to first unread message

Navaneetha Krishnan S

unread,
Jun 28, 2016, 5:04:41 PM6/28/16
to AngularJS

I have built a grid using kendogrid wrapped with angular2. the grid is getting populated with records by consuming the webapi service. 

Moreover I need to raise a rowclick event on the grid and on the click event, I need to fetch the record/async call to get the details for the row/record selected and display below on the same page. The details sections consists of around 10-12 textboxes and I should be able to bind the values fetched from the services call.


My UI looks like this, I have a grid in the top section - the grid is loaded with some record by consuming the services. When the user click on a any single row, the below details section controls to be loaded with the details values fetched by the asynch call.


I have given below a sample code to achieve the above required functionality in JQuery way. But i need some inputs in doing it in angular2 way. any ideas/suggestions ?


$(.kendogridcell).click(){
queueID = $(currentrow).children("gridcell")[0].val();//To fetch the key/ID which is used for retreiving by the service call
    $.ajax()
    {
        url:'http://sampleservice',
        data:data,
        success(function(response)
        {
            $("#txtapplication").val(response.applicationName);
            $("#JobName").val(response.JobName);
            ....
            ....
        });
    }

});//end gridcell click event

Navaneetha Krishnan S

unread,
Jun 29, 2016, 11:14:45 AM6/29/16
to AngularJS

actually I am in need of raising/handling the click event for a grid row in the kendo-grid. Since I am using 3rd party component the grid rows/cells are generated by the component and here I wont be able to associate any specific event as long as the component provides by default.

I am expecting something like the functionality in this demo http://demos.telerik.com/kendo-ui/grid/events

The specified demo is in Jquery and I want to handle the same onchange event in Angular2 component, 

any ideas on how to accomplish this?

Reply all
Reply to author
Forward
0 new messages