want to display data in datatable , How can i do
Sl.NO
ARN
Name of the Applicant
Applicant Address
Site Address
Action
Yogi SPosted Jan 26, 2024, 5:33 AM
These datatables articles will be helpful to you.
https://www.c-sharpcorner.com/article/create-datatable-in-jquery/
https://www.yogihosting.com/jquery-datatables/
Jayraj ChhayaPosted Jan 25, 2024, 3:37 AM
To display data in a DataTable in a Dot Net MVC application, you can follow these steps:
Install the required packages: First, make sure you have the necessary packages installed. You can use the NuGet package manager to install the required packages. The most commonly used package for DataTables in Dot Net MVC is "DataTables.AspNet.Mvc5".
Create a model: Create a model class that represents the data you want to display in the DataTable. Define the properties of the model class based on the columns you want to display in the DataTable.
Retrieve data from the database: Use the appropriate data access method (e.g., Entity Framework, ADO.NET) to retrieve the data from the database and populate a list of model objects.
Pass the data to the view: In your controller action method, pass the list of model objects to the view using the ViewBag or a strongly-typed view model.
Configure the DataTable: In the view, use the DataTables JavaScript library to configure the DataTable. You can specify the columns, sorting, filtering, and other options.
Bind the data to the DataTable: Use the DataTables JavaScript library to bind the data to the DataTable. You can use the "data" option to specify the data source and the "columns" option to map the columns to the model properties.
Here's an example of how you can display data in a DataTable in Dot Net MVC:
Ahmed AbdiPosted Jan 24, 2024, 4:13 PM
for more here https://datatables.net/