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.
ADAdministrator Syncfusion Team August 13, 2003 06:37 AM UTC
> Is there a way to format a cell like Excel's "General" format so that numbers are automatically right aligned and strings are left aligned?
>
No.
But you could handle PrepareViewStyleInfo, and set e.Style.HorizontalAlignment dynamically. If you have explicitly set the CellValueType for your numeric cells, you could test e.Style.CellValueType to determine how to set the alignment. If you have not set the CellValueType, you could try parsing e.Style.Text to see if it parses as a number to test what is in the cell.
JEJeffMay 23, 2004 02:20 PM UTC
I need text to align right for financial numbers which seems to be a very common occurence for grids? Um can someone please create a sample for this for us not so advanced programmers? plz
>> Is there a way to format a cell like Excel''s "General" format so that numbers are automatically right aligned and strings are left aligned?
>>
>
>No.
>
>But you could handle PrepareViewStyleInfo, and set e.Style.HorizontalAlignment dynamically. If you have explicitly set the CellValueType for your numeric cells, you could test e.Style.CellValueType to determine how to set the alignment. If you have not set the CellValueType, you could try parsing e.Style.Text to see if it parses as a number to test what is in the cell.
ADAdministrator Syncfusion Team May 23, 2004 04:22 PM UTC