Hello,
How do I remove spin button in this chile grid?
Thanks
@{
var ChildGrid = new Syncfusion.EJ2.Grids.Grid()
{
Locale = "pt",
QueryString = "TabelaConsumoId",
EditSettings = new Syncfusion.EJ2.Grids.GridEditSettings() { ShowDeleteConfirmDialog = true, AllowAdding = true, AllowEditing = true, AllowDeleting = true },
Toolbar = new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" },
Columns = new List<Syncfusion.EJ2.Grids.GridColumn> {
new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Field="Inferior", HeaderText="Inferior", EditType="numericedit" },
new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Field="Superior", HeaderText="Superior", EditType="numericedit" },
new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Type="number", Field="Taxa", HeaderText="Taxa", EditType="numericedit", Edit="@(new { @params = new Syncfusion.EJ2.Inputs.NumericTextBox() { ValidateDecimalOnType = true, Decimals = 2, ShowSpinButton = false }})" },
new Syncfusion.EJ2.Grids.GridColumn(){ Field="Fixa", HeaderText="Fixa", DisplayAsCheckBox=true, EditType="booleanedit" }
}
};
}
Hello,
Could you help me in this case?
Thanks
Hi Fernando,
We apologize for the delay in our response.
We have reviewed the screenshot you provided, but we cannot identify any spin button in the image. To further investigate your query, please provide us with the following information:
Thank you for your cooperation.
Regards,
Santhosh I
Hi Santhosh
I'm sorry, I was referring to these two arrows, one pointing up and the other down. I would like to remove them. Thank you very much.
@{
var ChildGridAgua = new Syncfusion.EJ2.Grids.Grid()
{
Locale = "pt",
QueryString = "TabelaConsumoId",
EditSettings = new Syncfusion.EJ2.Grids.GridEditSettings() { ShowDeleteConfirmDialog = true, AllowAdding = true, AllowEditing = true, AllowDeleting = true },
Toolbar = new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" },
Columns = new List<Syncfusion.EJ2.Grids.GridColumn> {
new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Field="Inferior", HeaderText="Inferior", EditType="numericedit" },
new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Field="Superior", HeaderText="Superior", EditType="numericedit" },
new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Type="number", Field="Taxa", HeaderText="Taxa", EditType="numericedit", Edit="@(new { params = new Syncfusion.EJ2.Inputs.NumericTextBox() { ValidateDecimalOnType = true, Decimals = 2, ShowSpinButton = false }})" },
new Syncfusion.EJ2.Grids.GridColumn(){ Field="Fixa", HeaderText="Fixa", DisplayAsCheckBox=true, EditType="booleanedit" }
}
};
}
<ejs-grid id="GridTabelaAgua" locale="pt" gridLines="Both" childGrid="ChildGridAgua" detailDataBound="detailDataBound" toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">
<e-data-manager url="@Url.Action("TabelaAgua_Read","Tabelas")"
insertUrl="@Url.Action("TabelaAgua_Create","Tabelas")"
removeUrl="@Url.Action("TabelaAgua_Delete","Tabelas")"
updateUrl="@Url.Action("TabelaAgua_Update","Tabelas")"
adaptor="UrlAdaptor"></e-data-manager>
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal"></e-grid-editSettings>
<e-grid-columns>
<e-grid-column field="NomeTabela" headerText="Tabelas" type="string" ></e-grid-column>
</e-grid-columns>
</ejs-grid>
Hi Fernando,
To change the Editor Component, utilize the "Column.EditType" property. The up and down arrow are rendered because you have set the "EditType" as "numericedit". For the "numericedit" type, the Grid will use our Numeric Text Box component. If you prefer not to render the Numeric Text Box component, set the "EditType" as "stringedit". This ensures the normal Text Box component is rendered for that particular column editor.
Please find the modified code snippet below for your reference:
|
[CSHTML]
var ChildGridAgua = new Syncfusion.EJ2.Grids.Grid({ . . . . . Columns = new List<Syncfusion.EJ2.Grids.GridColumn> { new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Field="Inferior", HeaderText="Inferior", EditType="stringedit" }, new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Field="Superior", HeaderText="Superior", EditType="stringedit" }, new Syncfusion.EJ2.Grids.GridColumn(){ Format="N2", Type="number", Field="Taxa", HeaderText="Taxa", EditType="stringedit", Edit="@(new { params = new Syncfusion.EJ2.Inputs.NumericTextBox() { ValidateDecimalOnType = true, Decimals = 2, ShowSpinButton = false }})" }, new Syncfusion.EJ2.Grids.GridColumn(){ Field="Fixa", HeaderText="Fixa", DisplayAsCheckBox=true, EditType="booleanedit" } } }; }
|
For more information about Edit Types and the list of available Edit Types, refer to the documentation link below:
Documentation: https://ej2.syncfusion.com/aspnetcore/documentation/grid/editing/edit-types
Regards,
Santhosh I
Hi,
Ok it works.
Thank you very much.
Hi Fernando,
We are glad to hear that the provided solution helped resolve the issue. Please feel free to reach out to us if you require any further assistance.
Regards,
Santhosh I