We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Data not save when grid is in batch mode


Grid not assigned ID of the identity ( and also a primary) field when in batch mode, therefore data is not saved to database. Data is saved when grid is in Dialog mode.

  <DetailTemplate Context="HCContext">





                                                <TabHeader Text="HC Report"></TabHeader>




                                                    var ODRecord = (HCContext as HC);

                                                    <SfGrid DataSource="@ListHCReport" Query="@(new Query().Where("HFCODE", "equal", ODRecord.HFCODE))"

                                                        AllowFiltering="true" AllowPaging="true" AllowSorting=true AllowTextWrap=true AllowExcelExport=true

                                                        Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update", "ExcelExport", "Search", "Print" })">

                                                        <GridPageSettings PageSize="10"></GridPageSettings>

                                                        <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Excel"></GridFilterSettings>

                                                        <GridEvents OnActionBegin="ActionBeginHandlerHCReport" TValue="HCReporting">


                                                        <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="Syncfusion.Blazor.Grids.EditMode.Batch"></GridEditSettings>


                                                            <GridColumn Field=@nameof(HCReporting.ID) HeaderText="ID" IsIdentity=true IsPrimaryKey=true Width="20" Visible=true></GridColumn>

                                                            <GridColumn Field=@nameof(HCReporting.HFCODE) HeaderText="HC Code" Width="30" DefaultValue="@ODRecord.HFCODE" Visible=false></GridColumn>

                                                            <GridColumn Field=@nameof(HCReporting.HF) HeaderText="HC" Width="20" Visible=false></GridColumn>

                                                            <GridColumn Field=@nameof(HCReporting.Dt) HeaderText="Date" Format="dd-MMM-yy" Type="ColumnType.Date" Width="25" Visible=true></GridColumn>

                                                            <GridColumn Field=@nameof(HCReporting.Val) HeaderText="Val" Width="25" Visible=true EditType="EditType.BooleanEdit" DisplayAsCheckBox=true TextAlign="TextAlign.Right"></GridColumn>




                                                                <GridSortColumn Field="Dt" Direction="SortDirection.Descending"></GridSortColumn>






                                                                    <GridAggregateColumn Field=@nameof(HCReporting.ID) Type="AggregateType.Count" Format="N0">



                                                                                var aggregate = (context as AggregateTemplateContext);


                                                                                    <p>Number of entries: @aggregate.Count</p>















2 Replies

NP Naveen Palanivel Syncfusion Team October 6, 2022 10:30 PM

Hi Sao,

Sorry for the inconvenience. 

We are currently Validating the reported query with  at our end and we will update the further details within two days(Oct 10, 2022). Until then we appreciate your patience.


Naveen Palanivel

NP Naveen Palanivel Syncfusion Team October 10, 2022 10:41 PM

Hi Sao,

We checked your query with given code we prepared simple sample as Grid inside the SfTab in Batch mode and we attached in this ticket. But we are quite unclear about your exact requirement. So kindly share the following details to validate the reported query further at our end.

  1. Share more details about your requirement elaborately .
  2. Share video demo of the issue, it’ll be more useful to us to understand your query
  3. Share If possible, reproduce the reported issue in the provided sample or simple issue reproduceable sample

Above requested details will be helpful for us to validate the reported query at our end and provide solution as early as possible. 


Naveen Palanivel

Attachment: BlazorApp1010_f0a848d0.zip

Live Chat Icon For mobile
Up arrow icon