Hi Sangeetha
please see attached video
Unfortunately, despite the above changes, the problem was not resolved
@page "/AllergiesPage"
@inject HttpClient http
<EjsButton @ref="ToggleBtn" @onclick="@onToggleClick" CssClass="e-flat" IsToggle="true" IsPrimary="true" Content="@Content"></EjsButton>
<EjsGrid id="Grid" @ref="@grid" EnableRtl="true" AllowFiltering="true" AllowResizing="true" AllowSorting="true" AllowTextWrap="true" ShowColumnChooser="true" ShowColumnMenu="true" GridLines="@GridLine.Both" Height="100%" AllowGrouping="true" AllowPaging="true" toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">
<EjsDataManager Adaptor="Adaptors.WebApiAdaptor" Url="api/Allergies" CrossDomain="true"></EjsDataManager>
<GridFilterSettings Type="@Syncfusion.EJ2.Blazor.Grids.FilterType.Menu"></GridFilterSettings>
<EjsPager PageSize="12"></EjsPager>
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="EditMode.Dialog"></GridEditSettings>
<GridColumns>
<GridColumn Field=@nameof(Allergies.AllergyId) HeaderText="AllergyId" TextAlign="@TextAlign.Center" IsPrimaryKey="true" IsIdentity="true"></GridColumn>
<GridColumn Field=@nameof(Allergies.AllergyName) HeaderText="AllergyName" TextAlign="@TextAlign.Center" ValidationRules="@(new { required= true })"></GridColumn>
<GridColumn Field=@nameof(Allergies.AllergyCategoryId) HeaderText="AllergyCategoryId" TextAlign="@TextAlign.Center" ValidationRules="@(new { required= true })" ForeignKeyField="Id" ForeignKeyValue="Name"
DataSource="@(new Syncfusion.EJ2.Blazor.DataManager(){ Url = "api/AllergyCategories/GetNameId", Adaptor= Syncfusion.EJ2.Blazor.Adaptors.WebApiAdaptor })"></GridColumn>
<GridColumn Field=@nameof(Allergies.Description) HeaderText="Description" TextAlign="@TextAlign.Center" ValidationRules="@(new { required= true })"></GridColumn>
</GridColumns>
</EjsGrid>
@code{
EjsGrid grid;
EjsButton ToggleBtn;
public string Content = "Play";
private void onToggleClick(UIMouseEventArgs args)
{
if (ToggleBtn.Content == "Play")
{
this.Content = "Pause";
}
else
{
this.Content = "Play";
}
}
}
visual stadio 2019 preveiw 7
blazor hosted core
Attachment:
button_1898a6b7.rar