[ 3 posts ]

Scott Vickery

  • Username: ScottV
  • Joined: Mon Nov 28, 2011 1:28 pm
  • Posts: 7
  • Offline
  • Profile

Datatable checkbox columns

Post Posted: Tue Nov 29, 2011 1:10 pm
+0-
How do I implement a checkbox column in YUI3's datatable?

Thanks,
Scott

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile
Tags:

Re: Datatable checkbox columns

Post Posted: Tue Nov 29, 2011 7:49 pm
+0-
You can define a custom formatter on a new "unbound" column that create the INPUT[type=checkbox] for each row. Then define a "click" handler linked to the DataTable with a subset of checkbox that will track the clicks to do whatever you need it to.

There is a short fiddle I worked up at http://jsfiddle.net/blunderalong/3gfZ5/ which shows a very basic working example.

Todd

Scott Vickery

  • Username: ScottV
  • Joined: Mon Nov 28, 2011 1:28 pm
  • Posts: 7
  • Offline
  • Profile
Tags:

Re: Datatable checkbox columns

Post Posted: Wed Nov 30, 2011 6:12 am
+0-
Exactly what I was looking for. Thank you very much.

Scott
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum