I have a xtragrid with values from a stored procedure.
I am getting the values in float (0.23) and I want to display in percent (23%).
What would be the best way to do it in C#?
before

after

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.
Use CustomDrawCell event if you just want to display the cell readonly. or You can use the CustomColumnDisplayText Event also.
Try this:
Another way use the Editor EditFormat and DisplayFormat property. and after setting these properties add it to the gridview column: Ref: How to format values shown in the XtraGrid
The simplest way is use GridColumn.DisplayFormat Property.
Hope this help..