I want that if the user enters numeric data it should be left aligned and if he enters other datatype then it should be left aligned. Text align I can give the css property that text-align:right. How can I find the datatype when the user enters data? I am using the jquery datatables.
Share
This is not a rails concern. If you want to set the css property based on the nature of content in the cell, I would strongly advise a jQuery / Javascript solution.
You could do something like this:
For a more complicated solution you could implement your own Jquery Filter, something like:
Which would allow you to filter values based on numeric constraints like: