Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

How to render one column as a checkbox column?

$
0
0
Hi guys,

I am using JSON Data as:

var testData = [
	{
		"name": "Project 01 Task 02",
		"ticket_id": "111",
		"ticket_date": "03/01/2013",
		"end_date": "08/02/2013",
		"ticket_type": "DEFECT",
		"approval_status": "APPROVED",
		"ticket_status": "COMPLETED"
	},
	{
		"name": "Project 01 Task 03",
		"ticket_id": "112",
		"ticket_date": "03/01/2013",
		"end_date": "08/02/2013",
		"ticket_type": "DEFECT",
		"approval_status": "APPROVED",
		"ticket_status": "COMPLETED"
	}
];

My table initialisation is:
  oTable = $('#dealTickets').dataTable({
    "aaData": testData,
    "aoColumns": [
      { "mDataProp": "name" },
      { "mDataProp": "ticket_id" },
      { "mDataProp": "ticket_date" },
      { "mDataProp": "end_date" },
      { "mDataProp": "ticket_type" },
      { "mDataProp": "approval_status" },
      { "mDataProp": "ticket_status"},
      { "mDataProp": "ticket_id"}
    ],
    "sPaginationType": "full_numbers"
  });

Here, I am using the ticket_id 2 times. When I use it the second time, I would like to render it as a checkbox with name such as "check" + ticket_id and the ticket_id as the value.

The question is how can I do that?

I can use the form example to then detect which rows have been selected and do further processing.

Any help appreciated.

Best Regards,

Ashish.

Viewing all articles
Browse latest Browse all 1816

Trending Articles