The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
HI I want to change the cellvalue type of a cell as PERCENTAGE.Such that like if for a currency I enter 5 it shows on the grid as $5.SIMILARLY i want to put 5 and the cell should display it as 5%.I hope my Question is clear ....If possible mail me the answer at lokesh.luthra@tatainfotech.com
Regards
Lokesh
ADAdministrator Syncfusion Team August 6, 2004 06:44 AM UTC
If the celltype is double (or decimal), then you can use the P format to display a decimal.
style.CellValueType = typeof(double);
style.Format = "P";
But this formatting accepts a number like .05 and displays iy a 5%. A 5 would be 500%. (It multiplies the values by 100). Here is forum thread with a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16888
If you have numbers like 5 and want them displyed like 5% (instead of 500%), then you should handle the QueryCellFormattedText event and add the % there. You would also want to handle the SaveCellFormattedText to strip the % sign back out.
If you want email notifications of updates, then you should use our Direct Trac system for your questions.
LLLokesh LuthraAugust 6, 2004 06:48 AM UTC
HI Clay Thanx for your prompt reply Infact this is the problem I am facing but I would like to know How I can remove the 00 which is added coz my functionaliuty is like that I cant Ask the user to enter 0.5
>If the celltype is double (or decimal), then you can use the P format to display a decimal.
>
>style.CellValueType = typeof(double);
>style.Format = "P";
>
>
>But this formatting accepts a number like .05 and displays iy a 5%. A 5 would be 500%. (It multiplies the values by 100). Here is forum thread with a sample. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16888
>
>If you have numbers like 5 and want them displyed like 5% (instead of 500%), then you should handle the QueryCellFormattedText event and add the % there. You would also want to handle the SaveCellFormattedText to strip the % sign back out.
>
>If you want email notifications of updates, then you should use our Direct Trac system for your questions.
ADAdministrator Syncfusion Team August 6, 2004 07:19 AM UTC
You would handle this case using QueryCellFormattedText and SaveCellFormattedText as mentioned in my previous post. Here is a sample.
ADAdministrator Syncfusion Team August 6, 2004 07:20 AM UTC