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" />
<GridColumn Field="IdFabrication" HeaderText="Number" Width="100" IsPrimaryKey="true" />
4- the methode used is :
public async void DataBoundHandler(BeforeDataBoundArgs<HandAdditionOfProd> args)
var selectedOfIndex = await MyGrid.GetRowIndexByPrimaryKey(106152);
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.
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
it's works good with 21.1.41 version !
Please get back to us if you need further assistance.