AD users and groups and x marks where a user is a member
AD users and groups and x marks where a user is a member
Hi,
I've got this very simple json dataset:
[{user: "Bill", ADSgroup: "Domain users"},{ user: "Bill", ADSgroup: "Application B"},{user: "Judy", ADSgroup: "Domain users"},{user: "Judy”, ADSgroup: "Application A"},{user: "John", ADSgroup: "Domain users"},{user: "John", ADSgroup: "Application B"},{user: "John", ADSgroup: "Printer 45"}
And I'd like to pivot it with the users horizontal and groups vertical and put only a sign (an X will do) in the location where the two match. Like in this simple example (see picture below).
http://i.imgur.com/iZHuYoI.jpg
Could this be done with DataTables? And if so how do I put the X only there where it should be.
Kind regards,
Frans
Answers
DataTables itself won't do a pivot transform, but there is no reason why you can modifying the JSON to do the pivot yourself. You would probably use
ajax.dataSrc
as a function if you do so, assuming you are Ajax loading the data.Use
columns.render
.Allan