|
<SfGrid DataSource="@Components" ShowColumnChooser="true" AllowSorting="true" AllowFiltering="true" GridLines="GridLine.Both" AllowPaging="true" Height="75%" AllowResizing="true" ID="ComponentGrid" @ref="ComponentGrid">
<GridEvents Created="OnComponentGridCreated" RowSelected="@ComponentRowSelected" TValue="PCB_Component" OnRecordClick="OnComponentRecordClicked" OnCellEdit="On_CellEdit" />
<GridColumns>
<GridColumn Field=@nameof(PCB_Component.Installed) Width="10%" Type="ColumnType.Boolean" EditType="EditType.BooleanEdit" DisplayAsCheckBox="true">
<EditTemplate>
@{
var order = (context as PCB_Component);
<SfCheckBox @bind-Checked="@order.Installed" TChecked="bool?" ValueChange="@((ChangeEventArgs<bool?> args) => valueChange(args.Checked))"></SfCheckBox>
}
</EditTemplate>
</GridColumn>
<GridColumn Field=@nameof(PCB_Component.Name) IsPrimaryKey="true" HeaderText="Component" Width="100" AllowEditing="false" />
<GridColumn Field=@nameof(PCB_Component.Description) HeaderText="Description" Width="200" AllowEditing="false" />
<GridColumn Field=@nameof(PCB_Component.Package) HeaderText="Package" AllowEditing="false" />
</GridColumns>
</SfGrid>
@code{
SfGrid<PCB_Component> ComponentGrid { get; set; }
public List<PCB_Component> Components { get; set; }
public void valueChange(bool? val)
{
}
|