Oh I see - this is in the DataTable and not the Editor fields?
What I would suggest in that case is using the columns.className option to assign a class name to the cells in a column. Then in the CSS add a rule to work with whatever class name you select: td.myClass { width: 25% } for example.
Ok, I am still not making myself clear. I understand the code. But where do I put this code. I have tried a number of places and it has not worked for me. Do I put the code into the table.cmsdata.js or the php file (I don't think so but had to include the choice, or as a script in the html file. I have tried both the .js and .html and nothing happens.
the columns.className etc. When I read the examples I think I see js code. But I have tried to make it work with no joy. just need to know where to place the code from the examples and I will be on my way
Answers
Hi,
You could use something like this in your CSS:
Allan
I looked in the css files and I don't see where I can just make one column larger. it is the 5th column of the data.
what should I look for ?
Oh I see - this is in the DataTable and not the Editor fields?
What I would suggest in that case is using the
columns.className
option to assign a class name to the cells in a column. Then in the CSS add a rule to work with whatever class name you select:td.myClass { width: 25% }
for example.Allan
I have been trying to find where I change the option's. I am very new but a quick learner once I get a feel for what is what.
There are a column of examples in the
columns.className
documentation. Also have a read through the manual section on options.Allan
Ok, I am still not making myself clear. I understand the code. But where do I put this code. I have tried a number of places and it has not worked for me. Do I put the code into the table.cmsdata.js or the php file (I don't think so but had to include the choice, or as a script in the html file. I have tried both the .js and .html and nothing happens.
Which code are you talking about?
the columns.className etc. When I read the examples I think I see js code. But I have tried to make it work with no joy. just need to know where to place the code from the examples and I will be on my way
That goes in your DataTables initialization script. Allan gave you links to the relevant documentation.
thank you