Base solution for your next web application
Open Closed

Jtable selectedrows #2506


User avatar
0
cangunaydin created

I want to call jtable selectedRows method but as i see from the interface jtable is always returning void. When i change it to jquery no syntax error that i am getting but when i built it, it gives me

Property 'each' does not exist on type 'void'

here is my code to call jtable 'selectedRows' method

var $selectedRows = this._$screensTable.jtable('selectedRows');
        $selectedRows.each(function () {
            var record = $(this).data('record');
            var personId = record.PersonId;
            var name = record.Name;
        });

3 Answer(s)
  • User Avatar
    0
    cangunaydin created

    By the way i am trying to implement it in angular2 project.

  • User Avatar
    0
    cangunaydin created

    i have fixed the issue. I have changed the interface for jtable method in typings.d.ts instead of

    interface JQuery {
        jtable(...any): void;
    }
    

    change it to

    interface JQuery {
        jtable(...any): JQuery;
    }
    

    stop the angular2 app after the change and start it again with npm start

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks,

    We will also apply it <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/68">https://github.com/aspnetzero/aspnet-ze ... /issues/68</a>.