Free Support Forum - aspose.com

Negative number in Gridweb

Hi All,

In Aspose Gridweb while changing the values into negative number it should auromatically change it red color of text.. Is it possible while editing the values in Gridweb using javascript...

If it possible kindly provide sample code for our understanding.

Regards,

Gawaskar

Hi,


Well, that is totally dependent upon what is your number formatting type/string. Aspose.Cells.GridWeb does support custom formatting where you may specify your desired custom formatting string (using the API) and apply it, now if you enter a negative number into a cell, it will be formatted as red, see the screen shot attached here.

Aspose.Cells.GridWeb normally follows MS Excel standards.

Regarding apply formatting on the client side, I am afraid, you have to only use our server side APIs.

Thank you.

Thanks..!

This could apply for only whole number in excel file itself,we are facing problem in percentage in negative value say in D7 cell we changed -6.7% as a value it should change into red color.

regards,

Gawaskar.

Hi,


Well, Aspose.Cells.GridWeb works the same way as MS Excel for numbers formatting. You need to specify the corresponding custom string for negative percentage values. I have tested it and it works fine. See the screen shot attached here.

Thank you.

Hi Amjad,

Thanks for sharing screen shot and providing approach to over come this.

Could you please provide sample example project or code to understand very clear how to fix this Negative Values in Gridweb into our project.

Regards,

Gawaskar.

Hi,


There is no special technique for it as I am justing testing your scenario using our featured demos for GridWeb (with version v2.7.17.xxxx(latest)) specifying input values and formatting as per my screen shot that would be installed on your system (e.g when you install our latest version of Aspose.Cells for .NET v7.4.2 package).

Moreover, you may download our offline demos and run them with our latest version of GridWeb e.g version v2.7.17.xxxx:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry294646.aspx

Thank you.