Skip to content

RequestHandlerSettings.ExcludeTotalCountByDefault property

Gets or sets whether the total record count is excluded by default for list requests that do not explicitly specify ExcludeTotalCount (i.e. it is null / not sent). Default is false, which preserves the historical behavior of calculating the total (and issuing a COUNT(*)) for paged requests. When a request has a zero take that DefaultPageSize / MaxPageSize turns into an actual page size, the total is still returned as if ExcludeTotalCount was false, unless IncludeMore was requested (a More indicator is returned instead).

public bool ExcludeTotalCountByDefault { get; set; }

Remarks

WARNING: Enabling this changes the default behavior of every List request that does not explicitly send ExcludeTotalCount, including grid requests that rely on TotalCount for their pager. Such grids will report a zero total until they explicitly send ExcludeTotalCount = false. Audit existing usages before enabling. Requests that explicitly send ExcludeTotalCount = false are unaffected, which is why the request property is nullable. Also note that requests with IncludeMore already skip the count.

See Also