enum field in DataTable igonore the options attribute

enum field in DataTable igonore the options attribute

wowzaaawowzaaa Posts: 3Questions: 3Answers: 0

Inside my db i have a nullable, ENUM column with room_style and service_order as possible values

inside my table config i have:
{ title: 'Type', data: 'sub_projects.sub_project_type', orderable: true, searchable: true, type: "select",
options: [
{ label: "Choose", value: null },
{ label: "Room Style", value: "room_style" },
{ label: "Service Order", value: "service_order" }
]
},

I cannot get the datatable to display the labels :(

any idea why?

thanks

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    It is problably not working because I don't think the options you are trying to use exist in the context that you are trying to use them. If you are trying to put a select box in a cell, you need to use a plug-in (I don't see one identified you your post) or use the render function to build it.

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    If what you are trying to do is add select to the cell, here is a sample
    http://live.datatables.net/heqinoga/1/edit

This discussion has been closed.