Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How do I override the default datatable to display my own HTML datatable using metronic template? #8264


User avatar
0
JLombela created

Hi,

How can I override the default datatable jQuery functions to let me display a customized table or HTML table using metronic template? I am stuck trying to figure this out. I am also even trying to move the ACTIONS column from being the first column to the last column and I can't seem to succeed on this.

Can you please point me in the right direction?

Regards John


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi @JLombela

    If possible please share some screenshots to illustrate your problem.

  • User Avatar
    0
    JLombela created

    Hi,

    Using the Tenants Index.cshtml, I have moved ther Actions column heading to show as last column on the grid, and that works perfectly. However now, I want to move the actual column showing the data to move last. See screenshots below.

    Now I want to move the column where the Actions command is show on the grid below to align with the column heading. But I cannot do this at all.

    Finally, I went to make changes to the Index.js file of the Tenants thinking that I would be able to override this behavior, but unfortunately I was wrong. See screenshot below:

    All I did was moving the target column last in the above script. I have read some blogs that menton that I need to override the default datatable.default.js but not sure how and where. I couldn't find the right answer.

    The requirements for me would be to make some custom datatable, for example showing more data in a single row and being able to expand a row for more child information, etc. But I want to know how can I override the default datatable rendering so that I can build any custom HTML I want to display my information.

    Your help is greatly appreciated. Please point me to the right blog or direction.

    Regards John

  • User Avatar
    0
    maliming created
    Support Team

    Please also try change the targets of columnDefs.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because of no recent activity. Please open a new issue if you are still having this problem.