Hi,
I am experiencing strange behaviour whenever I click on a row. The two last rows selected always remain selected. For instance, If I click on row 1 then 2, both rows are selected. If I then click on row 4, then rows 2 and 4 will be selected. Also, at some point, it gets really messy and all rows are selected whenever I click on a row.
This only happen when I use remote data, using SfDataManager. If I hardcode the data in the code then it works ok. I am using entity framework to source a treegrid control on a WASM app. I tried to configure the GridEditSettings but no luck.
I even tried using a component created using Syncfusion scaffolding mechanism (treegrid control), without even changing a bit of the code.
The page
<SfTreeGrid Id="TreeGrid" @ref="Treegrid" TValue="TreeNode" AllowRowDragAndDrop="true" AllowSorting="false" TreeColumnIndex="1" IdMapping="Id" ParentIdMapping="ParentId" Toolbar="@(new List<string>() { "Add","Edit", "Update", "Cancel"})" HasChildMapping="IsParent">
<SfDataManager Url="/api/NodeEntity" Adaptor="Adaptors.WebApiAdaptor"></SfDataManager>
<GridEditSettings AllowAdding="false" AllowDeleting="false" AllowEditing="true"></GridEditSettings>
<TreeGridColumns>
<TreeGridColumn Field="Id" HeaderText="Id" IsPrimaryKey="true" Width="10" Visible="false"></TreeGridColumn>
<TreeGridColumn Field="SortOrder" HeaderText="Order" Width="100" Visible="false"></TreeGridColumn>
<TreeGridColumn Field="Name" HeaderText="Name" Width="100"></TreeGridColumn>
</TreeGridColumns>
</SfTreeGrid>
The model
public class TreeNode
{
public int Id { get; set; }
public string Name { get; set; }
public int? ParentId { get; set; }
public int SortOrder { get; set; }
public int TreeId { get; set; }
public bool IsParent { get; set; }
}
The controller
Is the one created by syncfusion scaffolding process
Am I doing something wrong?
Martin.