ASP.NET, MVC, and Bootstrap - ComboBox, ListBox, and TokenBox - Database Server Mode (v18.2)

The DevExpress ASP.NET WebForms, MVC, and Bootstrap List Editors now support Database Server Mode. That means the DevExpress ASP.NET ComboBox, ListBox, and TokenBox controls can now easily bind to large data sources without the need for custom data binding.

Before the v18.2 release, we'd recommend that customers use the custom data binding approach. This involved implementing the ItemsRequestedByFilterCondition and ItemRequestedByValue events for the ComboBox control. While this approach gives full control over the data retrieval process, it also involves writing lots of code. Also, the ListBox and TokenBox controls didn't even support custom binding.

So, I'm happy to say that built-in Server Mode support is now available for the DevExpress ASP.NET List Editors. Therefore, if you bind the ComboBox, ListBox, or TokenBox controls using a server-mode enabled data source, then the control will only load the necessary items regardless of how big the data source is. I recommend reading the Server Mode section below to learn more.

Take a look at this animation to see how your end-users can benefit from this fast and powerful enhancement. In the GIF below, the DevExpress ASP.NET ComboBox is bound to a data source with 20,000 records! And with the server mode feature, you can bind to one million records or more:

How to use in ASP.NET and Bootstrap

Bind the List control to an EntityServerModeDataSource, LinqServerModeDataSource, or XpoDataSource control. Then set the EnableCallbackMode property to true.

How to use in ASP.NET MVC

Use the BindToEF and BindToLINQ methods to bind the List control to and Entity/Linq table. Then enable callbacks by setting the CallbackRouteValues property.

Full Control

However, if you have a scenario that requires full control of the data retrieval process then we recommend that you use these events

Take a look at these ASP.NET and MVC demos to see code examples of how to use these events.

The next section gives a short explanation and benefits of the Server Mode feature. Please feel free to skip this section if you're familiar with this excellent feature.

Server Mode

When building websites, binding to large amounts of server-side data can slow down the UI. For example, data binding a standard combo box control to one million records from your SQL Server will only lead to frustrated end-users who complain about slow or unresponsive web views.

There is a good solution to binding your controls to large amounts of data on the web: make your database server do the hard work instead of your web server. Your database is better suited to handle these large expensive data-intensive operations like paging, grouping, sorting, etc. Offloading the task to your database also has the benefits of faster page loads, concurrency, and more.

While we call it Server Mode, conceptually, it's similar to 'record paging' or 'server-side paging'. However, we at DevExpress have provided 'large database support' for many years and in many of our controls.

I recommend reading this help topic to learn more about 'Server Mode'.

Have you been looking forward to the DevExpress ASP.NET Combo Box or Token Box getting the Server Mode feature? Drop me a line below. Thanks!

no comments
No Comments

Please login or register to post comments.