<SfGrid DataSource="@tickets_resolved" AllowPaging="true" @ref="@Grid_Resolved">
<GridPageSettings PageSize="6"></GridPageSettings>
<GridColumns>
<GridColumn Width="50">
<Template>
@{
var ticket = (context as TicketDetails);
<SfButton @ref="EditBtnResolved" @onclick="@((args) => onToggleClick_Resolved(args,ticket))" IsToggle="true" IsPrimary="true">Edit</SfButton>
}
</Template>
</GridColumn>
<GridColumn Field=@nameof(TicketDetails.RequestID) HeaderText="Request ID" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center" Width="65"></GridColumn>
. . . . . .
</GridColumns>
</SfGrid>
@code{
SfGrid<TicketDetails> Grid_Resolved;
SfButton EditBtnResolved;
public List<TicketDetails> tickets_resolved { get; set; }
private void onToggleClick_Resolved(Microsoft.AspNetCore.Components.Web.MouseEventArgs args, TicketDetails tick)
{
var val = tick.RequestID; // access the record value here.
} |