BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hello
The row selection works fine normally, but after grouping by column, I get the following error :
Error: System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1.get_Value()
at Syncfusion.Blazor.Grids.Internal.Selection`1.SelectByRow(Row`1 rowToSelect, MouseAndKeyArgs evt)
at Syncfusion.Blazor.Grids.Internal.Selection`1.RowSelectionClickHandler(MouseAndKeyArgs e, ValueTuple`3 target)
at Syncfusion.Blazor.Grids.Internal.Selection`1.ClickHandler(MouseEventArgs e, ValueTuple`3 target)
at Syncfusion.Blazor.Grids.Internal.GridCellBase`1.CellClickHandler(MouseEventArgs e, Boolean IsCheckBox)
at Syncfusion.Blazor.Grids.Internal.GridCell`1.
This problem does not occur when all rows are selected and only occurs when one row is selected
My Code is :
<SfGrid @ref="@Grid" DataSource="@forecasts" Height="400" AllowSelection="true" AllowGrouping="true" AllowSorting="true" AllowPaging="true" EnableRtl="true" AllowFiltering="true">
<GridSelectionSettings AllowDragSelection="true" Type="SelectionType.Multiple" Mode="SelectionMode.Row"></GridSelectionSettings>
<GridEvents Created="Created" RowSelected="GetSelectedRecords" TValue="WeatherForecast"></GridEvents>
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Excel"></GridFilterSettings>
<GridPageSettings PageCount="5" PageSizes="true"></GridPageSettings>
<GridGroupSettings ></GridGroupSettings>
<GridColumns>
<GridColumn Type="ColumnType.CheckBox" Width="50"></GridColumn>
<GridColumn Field=@nameof(WeatherForecast.Date) HeaderText="تاریخ" TextAlign="TextAlign.Right" Width="120"></GridColumn>
<GridColumn Field=@nameof(WeatherForecast.TemperatureC) HeaderText="دما (سانتیگراد )" Width="150"></GridColumn>
<GridColumn Field=@nameof(WeatherForecast.TemperatureF) HeaderText=" دما ( فارنهایت )" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
<GridColumn Field=@nameof(WeatherForecast.Summary) HeaderText="توضیحات" TextAlign="TextAlign.Right" Width="120"></GridColumn>
</GridColumns>
</SfGrid>
@code {
public string[] GroupedColumns = new string[] { "Date" };
private IEnumerable<WeatherForecast> forecasts;
SfGrid<WeatherForecast> Grid;
public List<double> SelectedRowIndexes { get; set; }
public double[] TotalValue { get; set; }
public string SelectedValue;
public List<WeatherForecast> SelectedRecord { get; set; }
protected override async Task OnInitializedAsync()
{
forecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now));
}
public async Task GetSelectedRecords(RowSelectEventArgs<WeatherForecast> args)
{
SelectedRowIndexes = await this.Grid.GetSelectedRowIndexes();
SelectedRecord = await this.Grid.GetSelectedRecordsAsync();
TotalValue = SelectedRowIndexes.ToArray();
SelectedValue = "";
foreach (var data in TotalValue)
{
SelectedValue = SelectedValue + " " + data;
}
StateHasChanged();
}
public async Task Created()
{
await IJsRuntime.InvokeAsync<object>("SelectAll");
}
}
Thank you for your help in this case
Hello again
Does anyone know about this? Is this a bug?
please check it
Hi Meysam,
Sorry for the inconvenience that you have experienced with our product. We
understand the importance of a stable and reliable product for your business,
and we take your concerns very seriously.
We have already considered it as a bug and fixed the issue “Exception occurs when selecting a record.” for the same. Thank you for taking the time to report this issue and helping us to improve our product. At Syncfusion, we are committed to fix all validated defects (subject to technological feasibility and Product Development Life Cycle) and the fix will be included in the upcoming weekly patch release by the first week of February or in the Volume 4 SP.
We will inform you once the fix has been published. We appreciate your patience until then. You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.
Regards,
Monisha
Hello
Thank you for your attention and response
The registered error link warns me about the Access Denied . But I will wait for a new update anyway to fix this problem
Thanks
Hi Meysam,
We apologize for any inconvenience you may have experienced. We are pleased to inform you that access to your mail has been restored. Thank you for bringing this issue to our attention, and we will keep you updated on the release of any updates. Until then we value your patience.
Regards,
Monisha
Hi Meysam,
We are glad to announce that our Essential Studio 2022 patch Release v20.4.0.48
is rolled out and is available for download under the following link and we
have included fix for the issue “Exception occurs when selecting
a record with details template.” in our patch release (20.4.0.48).
NuGet : https://www.nuget.org/packages/Syncfusion.Blazor.Grid
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Monisha