Fetch currently Logged-in user row from Data-table and show

Fetch currently Logged-in user row from Data-table and show

sankarsnlsankarsnl Posts: 2Questions: 2Answers: 0
edited December 2017 in Free community support

Question: When the particular user logged-in using the Register Number. I want only the particular row to be fetched from all the table and shown in a block/page to the current user.

I think using search or filter code can do this.

How can i do this ?

Note: Expecting PHP/Javascript Code. Easy for me to understand.

Please find the Image attachment(Data table added using Feed).

Answers

  • jvretamerojvretamero Posts: 26Questions: 0Answers: 3

    I'm not sure, but for what I understood, when a users logs in, he/she has a Register Number and you want to use it to filter the records of the table.

    If yes, you can combine initComplete with column().search(). For example:

    initComplete: function (settings) {
        var api = new $.fn.dataTable.Api(settings);
        api.column(1).search('your register number');
    }
    
This discussion has been closed.