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

FransErichFransErich Posts: 1Questions: 1Answers: 0

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

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    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.

    And if so how do I put the X only there where it should be.

    Use columns.render.

    Allan

This discussion has been closed.