Completed
Last Updated: 25 Feb 2026 08:05 by ADMIN
Anurag
Created on: 24 Feb 2026 07:13
Category: UI for ASP.NET AJAX
Type: Feature Request
1
Best Practice for Pre-populating HeaderContext Filter Checkbox Lists (Avoiding AJAX Delay)
Hello Telerik Team,

I'm implementing HeaderContext filtering with checkbox lists on a RadGrid in a legacy ASP.NET WebForms application. 

Current Setup:
- FilterType="HeaderContext"
- FilterCheckListEnableLoadOnDemand="true"
- OnFilterCheckListItemsRequested event populates checkboxes from session data

Issue:
Users experience 500-2000ms delay when opening filter menus (AJAX callback to server). 
In our production environment with slow network and high concurrent users, this creates 
poor user experience.

Questions:
1. Is there a way to pre-populate checkbox lists during grid initialization 
   (avoiding AJAX callback)?
2. Can we use OnItemCreated to populate checkbox lists with 
   FilterCheckListEnableLoadOnDemand="false"? If so, what's the correct approach?
3. Is there a client-side caching mechanism for checkbox list items?
4. What's the recommended pattern for large datasets (1000+ rows) with multiple 
   filterable columns?

Environment:
- Telerik.Web.UI version: v4.0.30319
- .NET Framework: 4.8
- Browser: Chrome, IE11
- Grid has ~10 columns with 5 using checkbox filters

Any guidance on performance optimization would be greatly appreciated!

Thank you,
Anurag pandey
1 comment
ADMIN
Vasko
Posted on: 25 Feb 2026 08:05

Hello Anurag,

Let's go over your questions one by one.

Is there a way to pre-populate checkbox lists during grid initialization?

With FilterType="HeaderContext" and FilterCheckListEnableLoadOnDemand="true", the checklist items are populated via AJAX only when the user opens the filter menu. This behavior is intentional to reduce initial page size and improve scalability. A 500ms delay is generally acceptable, but a 2000ms delay indicates that something in the implementation or environment is slowing down the request.

The delay is not inherently caused by RadGrid itself, but by what happens inside the RadGrid1_FilterCheckListItemsRequested event. If the implementation queries the database each time, rebuilds large session objects, loads a very large number of distinct values, or triggers nested AJAX calls, delays are expected. The first diagnostic step should be to return a single hardcoded item in the event handler without any database or session access and test again.

If the delay still exists, the issue is environmental (network, IIS configuration, concurrency, MasterPage setup, or nested AJAX). If the delay disappears, then the data-fetching and list-building logic must be optimized.

Regarding pre-populating checkbox lists during grid initialization, there is no built-in way to bypass the AJAX callback when using HeaderContext with LoadOnDemand enabled. This mechanism is by design to avoid rendering all distinct filter values on initial page load.

Disabling LoadOnDemand may allow earlier preparation of filter lists, but this shifts the performance cost to page initialization and can negatively affect overall performance, especially with multiple filterable columns.

Can we use OnItemCreated to populate checkbox lists with FilterCheckListEnableLoadOnDemand="false"?

Using OnItemCreated to populate checkbox lists while setting FilterCheckListEnableLoadOnDemand="false" is not the intended approach. OnItemCreated is meant for row-level customization and not for supplying filter checklist data. While it may be technically possible to manipulate controls in that event, doing so defeats the purpose of the LoadOnDemand feature, which is specifically designed to improve performance by delaying data population until needed.

Is there a client-side caching mechanism?

There is no built-in client-side caching mechanism for filter checklist items. Each time a checklist is opened with LoadOnDemand enabled, a server request is made. If the concern is performance, the more appropriate solution is server-side caching of distinct values using MemoryCache, Application state, or another caching strategy, rather than attempting client-side storage.

Checkbox filtering is best suited for columns with a limited number of distinct values. If a column contains thousands of unique values, the checkbox UI itself becomes inefficient and should be reconsidered.

What's the recommended pattern for large datasets?

For large datasets with multiple filterable columns, there is no special alternative pattern required because RadGrid handles thousands of rows efficiently when properly configured. Performance issues usually stem from inefficient SQL queries, recalculating distinct values on every request, lack of caching, excessive ViewState, or nested AJAX panels.

If a column has a high number of distinct values, a better approach is to implement a custom FilterTemplate and use a more efficient control such as a load-on-demand combo or multi-select control with virtualization. Ultimately, the key to resolving the delay is analyzing and optimizing the implementation inside RadGrid1_FilterCheckListItemsRequested and reviewing the overall page and AJAX configuration.

Alternatively, you can also look at the Filtering Out Empty Values in RadGrid Excel Like Filtering article.

I hope this information answers your questions.

Regards,
Vasko
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources