|
<EjsGrid @ref="Grid" DataSource="@Employees" Height="315px">
<GridEvents RowDataBound="RowDatabound" DataBound="Data" TValue="EmployeeData"></GridEvents>
. . . . . . .. . . . . . .
</EjsGrid>
<style>
.hide {
visibility: hidden;
}
.disable{
pointer-events: none;
opacity: 0.4;
}
</style>
@code{
EjsGrid<EmployeeData> Grid { get; set; }
public List<int> DetailData = new List<int>(); //list to store the index of record which has details
public async void RowDatabound(RowDataBoundEventArgs<EmployeeData> Args)
{
List<Order> data = Orders.Where(x => x.EmployeeID == Args.Data.EmployeeID).ToList();
if (data.Count() > 0)
{
DetailData.Add(Employees.IndexOf(Args.Data));
}
}
public async void Data()
{
//to hide all the details icon
await JSRuntime.InvokeAsync<string>("hideDetail", Grid.ID);
// to display the icon which has details.
var text = await JSRuntime.InvokeAsync<string>("enableDetail", DetailData, Grid.ID);
}
. .. . . . . . .. . .
}
[detailIcon.js]
|
"What type of row customization did you used through RowTemplate feature."
"Share the rough image to show the look and appearance of your requirement"