Master Grid
<EjsGrid DataSource="@Orders" SelectedRowIndex="0" AllowPaging="true">
<GridEvents RowSelected="RowSelecthandler" TValue="Order"></GridEvents>
. . . . . . . .. . . . . . .
</EjsGrid>
Details Grid
<EjsGrid DataSource="@Employees" Query="@($"new ej.data.Query().where('EmployeeID', 'equal', {SelValue})")" AllowPaging="true">
. . . . . . .. . . . .
</EjsGrid>
@code{
public List<EmployeeData> Employees { get; set; }
public List<Order> Orders { get; set; }
public int? SelValue = 0;
public void RowSelecthandler(RowSelectEventArgs<Order> Args)
{
SelValue = Args.Data.EmployeeID;
}
. . . . .. . . . . ..
public class Order
{
. . .. .
public int? EmployeeID { get; set; }
. . . . .. . .
}
public class EmployeeData
{
public int? EmployeeID { get; set; }
. . . .. . . . .
}
} |