ColumnControl - custom content

ColumnControl - custom content

chris.durhamchris.durham Posts: 15Questions: 5Answers: 0

Does anyone have a simple example of a columnControl custom content widget. I've got the basics in place to create the button which does what I want (toggle rowgrouping on various fields), but I can't figure out how to integrate that into the dropdown menu's neatly.

The docs say that I can extend 'Button', but I can't see how I do that in the custom content code?

Answers

  • allanallan Posts: 64,920Questions: 1Answers: 10,752 Site admin

    Your best bet here is to take a look at the code for one of the existing buttons. For example this is for orderAsc.

    Worth noting as well that I plan to have a row grouping button in ColumnControl 1.1 which I hope will be out at the end of the month.

    Allan

  • chris.durhamchris.durham Posts: 15Questions: 5Answers: 0

    I looked at one of those, but couldn't figure out how to convert the

    new Button(dt)

    to JS

    :)

  • chris.durhamchris.durham Posts: 15Questions: 5Answers: 0

    Right - engaged brain and I think I've got it sorted :)

  • allanallan Posts: 64,920Questions: 1Answers: 10,752 Site admin

    That is JS :). That class is available under DataTable.ColumnControl.Button and can be instantiated from there. This might be a good one for a blog post sometime... Thanks for bringing this up!

    Allan

Sign In or Register to comment.