Skip to main content
A newer version of this page is available. .

Data Binding to Large Data via LINQ

  • 2 minutes to read

The Bootstrap Grid View control supports binding to large data sets using the LinqServerModeDataSource component. This component fully supports database server mode (delegates all data processing to the DB server), and only loads records to be displayed on-screen. This allows you to increase performance when working with large datasets.

The server mode can be enabled for any Language-Integrated Query (LINQ) provider. The LinqServerModeDataSource component is designed for ASP.NET applications and serves as a data source for the Bootstrap Grid View control.

When an end-user performs data operations - sorting, grouping, etc., the LinqServerModeDataSource component analyzes the grid’s current state and generates smart queries to receive only those records that must be displayed on-screen. These requests are passed to the associated LINQ Provider, which translates them into the required queries and executes them.

Example

The LinqServerModeDataSource component allows you to bind Bootstrap Grid View to ‘LINQ to SQL Classes’ and enable the server mode.

Create Data Classes

  1. Add ‘LINQ to SQL Classes’.

    cdLINQ_addClasses

  2. Data classes can then be created and edited in the Object Relational Designer (O/R Designer). The O/R Designer provides a visual design surface for creating LINQ to SQL entity classes and relationships based on objects in a database. The O/R Designer currently supports SQL Server 2000, SQL Server 2005, SQL Server 2008, and SQL Server Express databases.

    Entity classes can be created and mapped to tables and views by dragging database tables and views from Server Explorer/Database Explorer onto the O/R Designer.

  3. Save your changes, close the O/R Designer, and rebuild the solution.

Connect to data using the LinqServerModeDataSource control

  1. Drag the LinqServerModeDataSource component and drop it onto the Page.
  2. Specify the type of objects retrieved from a data source using the LinqServerModeDataSource.ContextTypeName property.
  3. Specify the data table name using the LinqServerModeDataSource.TableName property.
  4. Bind the Bootstrap Grid View control to the LinqServerModeDataSource component and specify the grid’s ASPxGridBase.KeyFieldName property.

Database Server Mode Limitations

In database server mode, Bootstrap Grid View does not have simultaneous access to bound data in its entirety. This imposes some limitations on the grid’s features, which are still available in regular binding mode. Please see the following topic for more information: Database Server Mode Limitations.

See Also