Attached to this message, you can find a sample that shows the binding of a repeater to a query executed through Telerik Data Access in the backend of the page, and a listview bound to OpenAccessLinqDataSource
. Both the repeater and the listview utilize plain tables to display the data. The two binding approaches can be used together, as well as separately - as alternatives. Either way, the end result allows you to style the content according to your needs. You can find the workflow for running the sample at the end of this post.
The idea for the repeater is to implement its templates providing the overview for the table, which will be displayed in it. This approach involves entirely manual typing of HTML code. On the backend side, the repeater will be bound to your query.
The idea for the listview is to bind it to a customized query executed through OpenAccessLinqDataSource
(no need for composing the queries yourself) and to use the Configure ListView dialogue
to automatically implement one of the predefined layouts. Note that although the implementation is generated automatically, you can still provide your custom styling for the table.
Additionally, the sample demonstrates one of the recommended by Telerik Data Access approaches for handling the instances of the context in a web scenario
How to run the sample:
1. Make sure you have an instance of SQL Server (Express) at your disposal.
2. Create the SofiaCarRental
sample database on the server.
3. Extract the .zip file on a convenient place.
4. Open the solution in Visual Studio.
5. Edit the App.config file in the model project, and the Web.config file in the web app project, to provide the name of the machine that hosts SQL Server, and the name of the server instance.
6. Upgrade the Data Access references as described here
7. Set the web app project as a startup project.
8. Press F5 for a test.
I hope this helps. If you need further information, do not hesitate to get back to us.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map