GetRowIndexByPrimaryKeyAsync return -1
Hello,
i want to select row by using GetRowIndexByPrimaryKey(Async) method but it returns always -1
1- Syncfusion version is 21.1.37
2- i have data and the row id in page when i execute the databoundHandler methode
3- the grid configuration begins with :
<SfGrid DataSource="@_ofProdDataSource" AllowFiltering="true" AllowPaging="false" AllowSelection="true" EnableAltRow="false" Height="100px" @ref="MyGrid">
<GridEvents TValue="HandAdditionOfProd" OnDataBound="DataBoundHandler" RowSelected="SelectProduction" />
<GridColumns>
<GridColumn Field="IdFabrication" HeaderText="Number" Width="100" IsPrimaryKey="true" />
4- the methode used is :
public async void DataBoundHandler(BeforeDataBoundArgs<HandAdditionOfProd> args)
{
await Task.Delay(200);
var selectedOfIndex = await MyGrid.GetRowIndexByPrimaryKey(106152);
await MyGrid.SelectRow(selectedOfIndex);
}
Hi Julien,
We checked your query and we prepared sample in lates version(21.1.41) based on given code snippet. But reported issue does not occurs at our end, GetRowIndexByPrimaryKeyAsync does not return the -1 value index when the given value within the grid. We also would like to inform that, GetRowIndexByPrimaryKeyAsync returns -1 when then the given filed value does not have in the grid , it returns -1 to indicate given value is not in grid . Please refer the attached sample for your reference.
If the reported issue still reproduced then kindly share the below details to validate further at our end.
- Share us the video demonstration of the issue in provided sample.
- Is -1 return after the given value present in the grid?
- If possible share us an simple issue reproduceable sample or try to modify the above mentioned sample.
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,
Naveen Palanivel
Attachment: Blazor_0410_(2)_c5c44493.zip
Hi Naveen,
it's works good with 21.1.41 version !
Thanks
Hi Julien,
Welcome
Please get back to us if you need further assistance.
Regards,
Naveen Palanivel.
- 3 Replies
- 2 Participants
-
JG Julien Gambini
- Apr 19, 2023 03:28 PM UTC
- Apr 24, 2023 01:50 PM UTC