@await Html.PartialAsync("Table", new DataTablesModel
{
Name = "shippingproviders-grid",
RowIdBasedOnField = nameof(ShippingProviderModel.SystemName),
UrlRead = new DataUrl("Providers", "Shipping", null),
UrlUpdate = new DataUrl("ProviderUpdate", "Shipping", null),
Length = Model.PageSize,
LengthMenu = Model.AvailablePageSizes,
ColumnCollection = new List
{
new ColumnProperty(nameof(ShippingProviderModel.FriendlyName))
{
Title = T("Admin.Configuration.Shipping.Providers.Fields.FriendlyName").Text
},
new ColumnProperty(nameof(ShippingProviderModel.SystemName))
{
Title = T("Admin.Configuration.Shipping.Providers.Fields.SystemName").Text,
Width = "250"
},
new ColumnProperty(nameof(ShippingProviderModel.DisplayOrder))
{
Title = T("Admin.Configuration.Shipping.Providers.Fields.DisplayOrder").Text,
Width = "100",
ClassName = NopColumnClassDefaults.CenterAll,
Editable = true,
EditType = EditType.Number
},
new ColumnProperty(nameof(ShippingProviderModel.IsActive))
{
Title = T("Admin.Configuration.Shipping.Providers.Fields.IsActive").Text,
Width = "100",
ClassName = NopColumnClassDefaults.CenterAll,
Render = new RenderBoolean(),
Editable = true,
EditType = EditType.Checkbox
},
new ColumnProperty(nameof(ShippingProviderModel.SystemName))
{
Title = T("Admin.Configuration.Shipping.Providers.Configure").Text,
Width = "200",
ClassName = NopColumnClassDefaults.Button + " column-configure",
Render = new RenderCustom("renderColumnConfigure")
},
new ColumnProperty(nameof(ShippingProviderModel.SystemName))
{
Title = T("Admin.Common.Edit").Text,
Width = "150",
ClassName = NopColumnClassDefaults.Button + " column-edit",
Render = new RenderButtonsInlineEdit()
}
}
})