I need to place default text to all rows for particular column in jquery grid.
How can I do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Apply a class name to the cells that require a default text -in this example the class name is ‘placeholder’- and target that with jQuery:
It’s untested, but I think it’ll do what you want, unless you need to use specific html for some reason? In which case:
should work instead.
Edited in response to question (in comments):
If you only need to perform this action on one particular cell you can either assign an
idor aclassto that cell, anidis/must be/should be unique in the document so only one element can have anyid. A class is probably still the easiest solution, since it allows for later re-use of the same code/jQuery function. Still, to advise:Incidentally, you might like to read the jQuery docs, over at: docs.jquery.com/