Hello,
I am using net core 5 + blazor wsam
In version 19.1.69 I am having problems to hide columns, please follow the steps that I indicate
1)Normal grid:
2)Hide column name 'Producto':
3)Grid after hiding the column 'Producto':
Could you help me detect what is happening?
Hello,
We have enabled the EnablePersistence option, then we disabled it to manage the status of the grids, and apparently this is what is causing us problems. We still don't know how to solve it.
Hello,
I am attaching a video where I show that I clear the browser cache and the problem continues.
Please helpme.
Hello Vignesh,
This is the part of the razor code:
<div class="col-lg-12 control-section">
<div class="content-wrapper">
<div class="row" id="gridPrevisiones">
<SfGrid AllowReordering="true" ShowColumnChooser="true" ShowColumnMenu="true" AllowResizing="true"
@ref="Grid" DataSource="@previsiones" AllowExcelExport="true" AllowGrouping="true" ID="Prevision"
RowHeight="20"
AllowSorting="true" AllowPaging="true" AllowFiltering="true"
Toolbar="@Toolbaritems" GridLines="GridLine.Both">
<GridPageSettings PageCount="20" PageSizes="true" PageSize="20"></GridPageSettings>
<GridSelectionSettings Type="Syncfusion.Blazor.Grids.SelectionType.Multiple"></GridSelectionSettings>
<GridEvents OnToolbarClick="@ClickHandler" QueryCellInfo="QueryCellInfoHandler" OnActionBegin="ActionBegin"
TValue="PresAnual"></GridEvents>
<GridFilterSettings Type="@Syncfusion.Blazor.Grids.FilterType.CheckBox"></GridFilterSettings>
<GridGroupSettings ShowGroupedColumn="true"></GridGroupSettings>
<GridEditSettings AllowDeleting="true" AllowEditing="true" Mode="@EditMode.Dialog" Dialog="DialogParams">
<Template>
@{
var prev = (context as PresAnual);
<div>
<div class="form-row">
<div class="form-group col-md-6">
<label class="e-float-text e-label-top">Producto:</label>
<br />
<SfTextBox ID="CG_ART" @bind-Value="@(prev.CG_ART)" Enabled="false"></SfTextBox>
</div>
<div class="form-group col-md-6">
<label class="e-float-text e-label-top">Descripcion del Producto:</label>
<br />
<SfTextBox ID="DES_ART" @bind-Value="@(prev.DES_ART)" Enabled="false"></SfTextBox>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label class="e-float-text e-label-top">Unidad:</label>
<br />
<SfTextBox ID="CG_ART" @bind-Value="@(prev.UNID)" Enabled="false"></SfTextBox>
</div>
<div class="form-group col-md-6">
<label class="e-float-text e-label-top">Cantidad Pedida:</label>
<br />
<SfNumericTextBox ID="Codigo" Format="N" @bind-Value="@(prev.CANTPED)" Enabled="true"></SfNumericTextBox>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label>Fecha Prevista:</label>
<br />
<SfDatePicker ID="FE_PED" @bind-Value="@(prev.FE_PED)" Enabled="true" Placeholder="Fecha Prevista"></SfDatePicker>
</div>
</div>
</div>
}
</Template>
</GridEditSettings>
<GridColumns>
<GridColumn Field=@nameof(PresAnual.CG_ART) HeaderText="Producto" TextAlign="TextAlign.Left" Width="30px"></GridColumn>
<GridColumn Field=@nameof(PresAnual.DES_ART) HeaderText="Descripcion del Producto" TextAlign="TextAlign.Left" Width="30px"></GridColumn>
<GridColumn Field=@nameof(PresAnual.UNID) HeaderText="Unidad" TextAlign="TextAlign.Left" Width="30px"></GridColumn>
<GridColumn Field=@nameof(PresAnual.CANTPED) Format="N" HeaderText="Cantidad Pedida" TextAlign="TextAlign.Left" Width="30px"></GridColumn>
<GridColumn Field=@nameof(PresAnual.FE_PED) HeaderText="Fecha Prevista" Format="dd/MM/yyyy" TextAlign="TextAlign.Left" Width="30px"></GridColumn>
</GridColumns>
</SfGrid>
</div>
</div>
</div>
This happens to me in all the grids of the application
Thanks.
I just realized that this is solved
if (args.RequestType == Syncfusion.Blazor.Grids.Action.ColumnState)
{
await Grid.AutoFitColumnsAsync ();
}
Excuse me, it still doesn't work.
Hi Vignesh,
As I have not been able to find a solution I have prepared a sample similar to our project. This project is logged in and connected to a database. I decided to leave it as close to the original project as possible so you can tell me how to fix it.
On the index page you can find a grid connected to the MS SQL database.
Thanks.
Please, help me.
Hello, Just now I see your answer, I did not get the notification, excuse me. The credentials are user: USER and password Admin123
Please also try it without login
Hola Vignesh,
I share a new application:
1) with css and sass
2) No database
3) check error when hiding columns.
Thanks.
|
<link rel='nofollow' href="manifest.json" rel="manifest" />
<link async rel='nofollow' href="_content/Syncfusion.Blazor.Themes/material.css" rel="stylesheet" />
<link rel="apple-touch-icon" sizes="512x512" rel='nofollow' href="logo_aerre.jpg" />
<link async rel='nofollow' href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<script src="FuncionesJavaScript.js"></script>
<link defer rel='nofollow' href="css/font-awesome/font-awesome.css" rel="stylesheet" />
<!--<link rel='nofollow' href="css/simple-line-icons/css/simple-line-icons.css" rel="stylesheet" />
<link rel='nofollow' href="css/themify-icons/themify-icons.css" rel="stylesheet" />-->
<link defer rel='nofollow' href="css/animate.css" rel="stylesheet" />
<link defer rel='nofollow' href="css/style.css" rel="stylesheet" />
<!--<link defer rel='nofollow' href="css/default-dark.css" id="theme" rel="stylesheet" />-->
<link rel='nofollow' href="_content/Syncfusion.Blazor.Themes/fabric.css" rel="stylesheet" />
<link defer rel='nofollow' href="css/pages.css" rel="stylesheet" />
|
Hi Vignesh,
First thank you very much for the solution.
We have purchased a template to add to our website, that theme file corresponds to a template.
We do not like to use fabric there is possibility to use material?
Thanks.