Search code examples
yui

make a link in column Data table YUI


I have a web page that contains a data table I want to make the first column cells redirect the user to another pages depend on its value so I want first to get the value from a cell second to make a link from this cell to another page depend on that value.

any advises.


Solution

  • You need to write a custom cell formatter. Check the documentation for whichever version of YUI you are using:

    YUI 2: http://developer.yahoo.com/yui/datatable/#format

    YUI 3: http://yuilibrary.com/yui/docs/datatable/#formatters