<SfGrid @ref="GridInstance" TValue="CollectiviteTypeOperation" DataSource="@typeOperations"
AllowSorting="true" AllowResizing=true EnableAltRow="true" Toolbar="@(new List<string>() { "Cancel", "Update" })"
Width="100%" Height="100%">
<GridEvents CellSelected="CellSelectHandler" TValue="CollectiviteTypeOperation"></GridEvents>
<GridEditSettings AllowEditing="true" Mode="EditMode.Batch" AllowEditOnDblClick="false"></GridEditSettings>
<GridSelectionSettings Mode="Syncfusion.Blazor.Grids.SelectionMode.Both" Type="SelectionType.Single"></GridSelectionSettings>
<GridColumns>
<GridColumn Field="@nameof(CollectiviteTypeOperation.Nature)" AllowEditing="false" Width="100px">
<Template>
@if (((CollectiviteTypeOperation)context).Nature == "D")
{
<span>Dépenses</span>
}
else
{
<span>Recettes </span>
}
</Template>
</GridColumn>
<GridColumn Field="@nameof(CollectiviteTypeOperation.Libelle)" AllowEditing="false" Width="100%"></GridColumn> <GridColumn Field="@nameof(CollectiviteTypeOperation.RevalorisationAutomatique)" AllowEditing="true" Width="105px" TextAlign="@TextAlign.Center" DisplayAsCheckBox="true"></GridColumn>
<GridColumn Field="@nameof(CollectiviteTypeOperation.PresenceTypeRevalorisation)" Width="150px" TextAlign="@TextAlign.Center" DisplayAsCheckBox="true"></GridColumn>
<GridColumn Field="@nameof(CollectiviteTypeOperation.PourcentageMaxDepassement)" Width="150px" TextAlign="@TextAlign.Right" EditType="@EditType.NumericEdit"></GridColumn>
<GridColumn Field="@nameof(CollectiviteTypeOperation.MontantMaxDepassement)" Width="150px" TextAlign="@TextAlign.Right" EditType="@EditType.NumericEdit"></GridColumn>
</GridColumns>
</SfGrid>
|
<SfGrid @ref="GridInstance" TValue="CollectiviteTypeOperation" DataSource="@typeOperations"
AllowSorting="true" AllowResizing=true EnableAltRow="true" Toolbar="@(new List<string>() { "Cancel", "Update" })"
Width="100%" Height="100%">
<GridEvents RowSelected="RowSelectHandler" TValue="CollectiviteTypeOperation"></GridEvents>
<GridEditSettings AllowEditing="true" Mode="EditMode.Normal"></GridEditSettings>
. . . .. .
</SfGrid>
|