Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Change css classes #46

Closed
MarlonEtiene opened this issue Mar 12, 2014 · 4 comments
Closed

Change css classes #46

MarlonEtiene opened this issue Mar 12, 2014 · 4 comments

Comments

@MarlonEtiene
Copy link

Hello,

First I would like to thank you for this great job!

But I have a question: Is there any way to change the class of the element table.
example:

Thank you for your attention!

@Chumper
Copy link
Owner

Chumper commented Mar 12, 2014

You can edit the template and provide your own on the render method on the table function:

DataTable::table()
    ->addColumn($columns)
    ->setUrl($ajaxRouteToTableData)
    ->render('my.datatable.template') 

@Chumper
Copy link
Owner

Chumper commented Mar 12, 2014

If you just want to change the class name use the setClass method on the table object:

DataTable::table()
    ->addColumn($columns)
    ->setUrl($ajaxRouteToTableData)
    ->setClass('myCustomClass')
    ->render('my.datatable.template') 

@MarlonEtiene
Copy link
Author

Thank you!

In time have any clue to add checkbox columns?

And If I have large amount of data, the "render" is too slow and paginate and filter are too slow too.

Unfortunatelly I have a view with about 21.000 rows but only 8 columns...

Another need is add some buttons in a cell (a td with 5 or 6 buttons) Any clue to do it?

Thanks in advance!

@Chumper
Copy link
Owner

Chumper commented Mar 12, 2014

What Engine are you using? If you need more speed you should use the QueryEngine.

As you can return any html in the addColumn method it should be no problem to return a checkbox or even a buttongroup.

@Chumper Chumper closed this as completed Mar 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants