Skip to content

Desired Razor Formatting changes #8413

Open
@StevenTCramer

Description

@StevenTCramer
  1. Be able to stop aligning to the right.

Here is a sample of how I like to format.

<SfGrid DataSource=@Contacts AllowPaging=true Toolbar=@Toolbaritems>
    <Syncfusion.Blazor.Data.SfDataManager Json=@Contacts></Syncfusion.Blazor.Data.SfDataManager>
    <GridEvents CommandClicked=OnCommandClicked TValue=ContactDto> </GridEvents>
    <GridEditSettings AllowAdding=true AllowDeleting=true AllowEditing=true Mode=@EditMode.Dialog></GridEditSettings>
    <GridColumns>
        <GridColumn Field=@nameof(ContactDto.FirstName) HeaderText="First Name"></GridColumn>
        <GridColumn Field=@nameof(ContactDto.LastName) HeaderText="Last Name"></GridColumn>
        <GridColumn Field=@nameof(ContactDto.Email) HeaderText="Email"></GridColumn>
        <GridColumn Field=@nameof(ContactDto.Phone) HeaderText="Phone"></GridColumn>
        <GridColumn HeaderText="Actions" TextAlign=TextAlign.Center Width="150">
            <GridCommandColumns>
                <GridCommandColumn 
                    ButtonOption=@(new CommandButtonOptions() { IconCss ="e-icons e-edit"})
                    Title="Edit" 
                />
                <GridCommandColumn 
                    ButtonOption=@(new CommandButtonOptions() { IconCss="e-icons e-delete"})
                    Title="Delete">
                </GridCommandColumn>
            </GridCommandColumns>
        </GridColumn>
    </GridColumns>
</SfGrid>

But currently the formatter will change this to the following.

<SfGrid DataSource=@Contacts AllowPaging=true Toolbar=@Toolbaritems>
    <Syncfusion.Blazor.Data.SfDataManager Json=@Contacts></Syncfusion.Blazor.Data.SfDataManager>
    <GridEvents CommandClicked=OnCommandClicked TValue=ContactDto> </GridEvents>
    <GridEditSettings AllowAdding=true AllowDeleting=true AllowEditing=true Mode=@EditMode.Dialog></GridEditSettings>
    <GridColumns>
        <GridColumn Field=@nameof(ContactDto.FirstName) HeaderText="First Name"></GridColumn>
        <GridColumn Field=@nameof(ContactDto.LastName) HeaderText="Last Name"></GridColumn>
        <GridColumn Field=@nameof(ContactDto.Email) HeaderText="Email"></GridColumn>
        <GridColumn Field=@nameof(ContactDto.Phone) HeaderText="Phone"></GridColumn>
        <GridColumn HeaderText="Actions" TextAlign=TextAlign.Center Width="150">
            <GridCommandColumns>
                <GridCommandColumn ButtonOption=@(new CommandButtonOptions() { IconCss ="e-icons e-edit"})
                                   Title="Edit" />
                <GridCommandColumn ButtonOption=@(new CommandButtonOptions() { IconCss="e-icons e-delete"})
                                   Title="Delete">
                </GridCommandColumn>
            </GridCommandColumns>
        </GridColumn>
    </GridColumns>
</SfGrid>

https://www.loom.com/share/e1f8b29ca5b8471d91486252e7f03822

  1. be able to stop quotes being inserted after entering =

https://www.loom.com/share/5e581760aac841b789889099e747da98

  1. Be able to turn off all formatting. (For times when it just doesn't do what the user wants)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions