We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Foreign Column sfdatamanager odata error MaxNodeCount


the definition column is:

<GridForeignColumn TValue="EmployeeDto" Field=@nameof(DepartmentDto.ResponsibleId) HeaderText="Responsable" Width="120" EditType="EditType.DropDownEdit"
                ForeignKeyValue="Name" ForeignKeyField="Id">
                        <SfDataManager Url="@($"{Configuration["UrlApiData"]}/odata/employee?$select=Id,FullName&$orderby=Fullname")"
                                   CrossDomain="true" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
                        @((context as DepartmentDto).FkField_Employee_ResponsibleName)
                            var record = (context as DepartmentDto);
                        <SfDropDownList ID="cbResponsible" Placeholder="Selecciona un Empleado" TItem="EmployeeDto" TValue="int?" @bind-Value="@(record.ResponsibleId)" Width="300px"
                                    FilterType="Syncfusion.Blazor.DropDowns.FilterType.Contains" ShowClearButton="true" AllowFiltering="true">
                            <DropDownListFieldSettings Text="Surname" Value="Id"></DropDownListFieldSettings>
                            <DropDownListTemplates TItem="EmployeeDto">
                                <ItemTemplate Context="empcontext">
                                    <span style="font-size: 11px;">@($"{(empcontext as EmployeeDto).FullName}")</span>

                                <ValueTemplate Context="childcontext">
                                    <span class="cbvalue">@($"{(childcontext as EmployeeDto).FullName}")</span>
                            <SfDataManager Url="@($"{Configuration["UrlApiData"]}/odata/employee?$select=Id,FullName&$orderby=Fullname")"
                                       CrossDomain="true" Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>

if Fk Table have few records no problem but if i have over 200 records have this error:

The query specified in the URI is not valid. The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings.

in configuration Api i have this settings for oData

.AddOData(opt => opt.AddRouteComponents("odata", GetEdmModel()).Select().Expand().Filter().OrderBy().SetMaxTop(1000).Count());

i test added this with no result

   services.AddODataQueryFilter(new EnableQueryAttribute

                AllowedQueryOptions = AllowedQueryOptions.All,
               MaxNodeCount = 500,


not sure how avoid this message on page render


thank's in advance.

1 Reply

PS Prathap Senthil Syncfusion Team March 6, 2023 03:47 PM UTC

Hi Sergio,

Greetings from Syncfusion.

Before proceeding further with your requirement. we need some more clarifications from your end. kindly share the below details to proceed further at our end.

  1. Share with us the entire code snippet With the model class.
  2. If possible, share with us a simple issue reproducible sample.

Above requested details will be very helpful in validating the reported query at our end and providing a solution as early as possible.

Prathap S

Live Chat Icon For mobile
Up arrow icon