Is any solution in Jqgrid if there is negative number then show bracket "()" ?
ex: show (23) if value was -23
thanks
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.
You can use custom formatter to do what you want. To format numbers or integers correctly you can call
$.fmatter.util.NumberFormatmethod with$.jgrid.formatter.numberor$.jgrid.formatter.integeras the second parameter. The example of the formetter isyou can additionally change color or some other CSS style of displaying of the negative numbers. You can use
cellattrproperty to addclassorstyleattribute in the cells with negative numbers:The demo demonstrate the settings. The results are the following