Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I am confused whether to use datatable or generic list to pass values from dal to bal and ui since the amount of data is same despite of using both datatable or generic list ?

Some posts on google says it doesn't make much difference while some says list is better over datatable ?

Please justify.........?

Also, how to implement sorting in gridview through generic list in 3 tier architecture ?
Please provide a example with steps and its explanation.

What I have tried:

sorting gridview in 3 tier architecture..............
Posted
Updated 25-Apr-17 5:58am
Comments
[no name] 25-Apr-17 11:41am    
I will prefer to choose generic list than DataTable but it completely depend on data you are exchanging between your different layers. You have to choose which is best suite you depending on type of your data.

1 solution

Use a generic list as it's more lightweight than a datatable and it's also strongly typed.
 
Share this answer
 
Comments
Richard Deeming 25-Apr-17 15:20pm    
It also makes life easier when you decide to add a new front-end that doesn't support DataTables - for example, .NET Core. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900