Hello,
We are using syncfusion grid with batch mode edit functionality and we got an issue that when I click on add button for adding a new row in a grid then after editing cell when I move to another cell then I can not able to see the value of a cell. Note:- If I double click on the cell then only that particular cell value appeared. if I left that then the cell was highlighted with green color. So can you please suggest any way to fix these issues? On add click I want to show value for all cells on edit mode instead of green color highlight.
As per below pic 1 and pic 2. When I just double-click on edit mode then only cell value appeared. if I left that cell then that value did not display and that was highlighted with the green color. So instead of this green color, I want to see the data which I added on edit mode for the whole row.
version - we are using syncfusion version 18.1.0.44.
Sample Code :-
<SfGrid @ref="DefaultGrid" DataSource="@ClassAList" AllowResizing="false" AllowSorting="true" AllowMultiSorting="true" GridLines="GridLine.Both"
AllowTextWrap="true" AllowFiltering="true" AllowPaging="false" Height="530" AllowExcelExport="true" AllowReordering="false" AllowGrouping="true" ShowColumnChooser="true"
Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update","ColumnChooser" })" ColumnMenuItems="MenuItems" ContextMenuItems="@ContextMenuItems" Width="100%">
<GridEvents OnCellEdit="CellEdit" OnBatchAdd="BeforeAdd" OnBatchSave="BatchSaveHandler" CellSaved="CelldSavedHandler" CommandClicked="OnCommandClicked"
TValue="ClassA"></GridEvents>
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.CheckBox"></GridFilterSettings>
<GridGroupSettings ShowGroupedColumn="true"></GridGroupSettings>
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Batch" ShowConfirmDialog="false" NewRowPosition=NewRowPosition.Top></GridEditSettings>
<GridSelectionSettings Mode="Syncfusion.Blazor.Grids.SelectionMode.Cell"></GridSelectionSettings>
<GridColumns>
<GridColumn Field=@nameof(ClassA.Id) HeaderText="ID" Visible="false" IsPrimaryKey="true"></GridColumn>
<GridColumn Field=@nameof(ClassA.Condition) Width="300" HeaderText="Diagnosis Test">
<Template>
@if (string.IsNullOrEmpty((context as ClassA).Condition))
{
<div style="height:100px;" class="manualEntry">
</div>
}
else
{
<div style="font-weight:bold;">
@((MarkupString)((context as ClassA).Condition))
</div>
}
</Template>
</GridColumn>
<GridColumn Field=@nameof(ClassA.ClsSupportingFilesId) Width="200" HeaderText="File ID" TextAlign="TextAlign.Left">
<Template>
@if (string.IsNullOrEmpty((context as ClassA).ClsSupportingFiles.FileName))
{
<div style="height:100px;" class="manualEntry">
</div>
}
else
{
<div style="font-weight:bold;">
@((MarkupString)((context as ClassA).ClsSupportingFiles.FileName))
</div>
}
</Template>
<EditTemplate>
@{
<SfComboBox PopupWidth="2000" AllowCustom="false" Placeholder="Select Document ID " ID="ClsSupportingFilesId" TValue="int?" TItem="ClsSupportingFiles" Value="@((context as ClassA).ClsSupportingFilesId)" AllowFiltering="true" DataSource="@SupportingFilesList" FilterType="Syncfusion.Blazor.DropDowns.FilterType.Contains">
<ComboBoxFieldSettings Value="Id" Text="Metadata"></ComboBoxFieldSettings>
</SfComboBox>
}
</EditTemplate>
</GridColumn>
<GridColumn Field=@nameof(ClassA.PreDateInjuryName) Width="250" HeaderText="document" TextAlign="TextAlign.Left">
<Template>
@if (string.IsNullOrEmpty((context as ClassA).PreDateInjuryName))
{
<div style="height:100px;" class="manualEntry">
</div>
}
else
{
<div style="font-weight:bold;">
@((MarkupString)((context as ClassA).PreDateInjuryName))
</div>
}
</Template>
<EditTemplate>
<SfComboBox PopupWidth="400" AllowCustom="false" Placeholder="MOI" ID="PreDateInjuryName" Value="@((context as ClassA).PreDateInjuryName)" DataSource="@preDateInjuryTypes">
<ComboBoxFieldSettings Value="Text" Text="Text"></ComboBoxFieldSettings>
</SfComboBox>
</EditTemplate>
</GridColumn>
<GridColumn Field=@nameof(ClassA.AdditionalComments) Width="250" HeaderText="Additional Comments" TextAlign="TextAlign.Left">
<Template>
@if (string.IsNullOrEmpty((context as ClassA).AdditionalComments))
{
<div style="height:100px;" class="manualEntry">
</div>
}
else
{
<div style="font-weight:bold;">
@((MarkupString)((context as ClassA).AdditionalComments))
</div>
}
</Template>
</GridColumn>
</GridColumns>
</SfGrid>
Hi Rahul,
Is there any way I can able to fix this issue in the same version? without update syncfusion latest version because right now our application in the production and updating version required lots of work because it's giving lots of other errors too. SO is there any way I can fix this issue in the current version?
Thank