Hi
I am seeing the following issues:
@page "/"
@inject ProductSetViewModel ProductVM
<PageTitle>Product Sets</PageTitle>
<h2>Product Sets</h2>
<SfGrid DataSource="ProductVM.GetAllProductSet()" Toolbar=Toolbaritems >
<GridEvents RowSelected="ProductVM.RowSelectHandler" TValue="ProductSet"></GridEvents><GridEditSettings AllowAdding="true" ></GridEditSettings>
<GridColumns>
<GridColumn Field="@nameof(ProductSet.ProjectId)" HeaderText="Project Id" Width="50" />
<GridColumn Field="@nameof(ProductSet.ProductSetId)" HeaderText="ProjectSet Id" Width="100" />
<GridColumn Field="@nameof(ProductSet.DisplayName)" HeaderText="DisplayName" Width="100" />
<GridColumn Field="@nameof(ProductSet.DataLocation)" HeaderText="Data Location" Width="100" />
<GridColumn Field="@nameof(ProductSet.IndexTime)" HeaderText="Last Indexed Time" Width="100" />
</GridColumns>
</SfGrid>
@code{
private List<Object> Toolbaritems = new List<Object>() { "Add", "Delete", "Update", "Cancel" };
public void ToolbarClickHandler(Syncfusion.Blazor.Navigations.ClickEventArgs args)
{
if (args.Item.Id == "Click")
{
//You can customize your code here.
}
}
}
public void RowSelectHandler(RowSelectEventArgs<ProductSet> args)
{
if (args.Event != null)
{
List<Product> products = vision.GetAllProductsByProductSet(args.Data.Id);
productsInSet = products;
}
}
Hi Sune,
Sorry for the inconvenience.
we are really sorry for the delay We are currently Validating the reported query with high importance at our end and we will update the further details within two days. Until then we appreciate your patience.
Regards,
Naveen Palanivel
Hi Sune,
Thanks for the patience,
We checked your query and we would like to inform that unfortunately reported issue is does not reproduced at our end. We prepared the video from our side attached in this ticket. We also see in your code snippet IsPrimary key is not enable in CRUD operation. While preforming the CURD operation, to enabled IsPrimarykey column to an unique column and that column will not able to edit. Please refer the video attachment and UG documentation for more information.
Reference : https://blazor.syncfusion.com/documentation/datagrid/editing
Please get back to us if you need further assistance
Regards,
Naveen Palanivel
Hi
It still does not work for me. I have added the IsPrimarykey = true to the Grid and added the the RowSelected event. Please see attached video.
public void RowSelectHandler(RowSelectEventArgs
{
ProductSet ps = args.Data;
}
Hi Sune,
We have checked your shared video and prepared an sample as per your shared video. But we could not able to replicate the reported issue at our end. Kindly check the attached sample for additional information.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/EVENTH~31378243100.zip
If the reported issue still persist then kindly share the below details to validate further at our end.
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.
Regards,
Monisha
Hi
Thanks for your help. I got it to work now but seems there needs to be local references in the @code section of the Blazor page for the Grid to work seemlessly. I can live with that.
Best Regards,
Sune
Hi Sune,
Welcome.
We are glad to hear that the reported query has been resolved. Kindly get back to us if you have further queries. As always we will be happy to help you.
Regards,
Monisha