How to choose data-bound network management

I recently started working with ASP.NET 3.5, previously working with C # and WinForms (mostly .NET 1.1) for about 6 years now.

My head spins every time I need to allow the user to view, add / remove, or edit a list of items. This is due to the similarities and differences of the following controls

  • DataGrid
  • GridView
  • ListView
  • DataList

Can anyone point me in the right direction with a good list that does side-by-side comparison of these controls?

What's your "favorite" or your favorite for any specific scenarios?

0


source to share


1 answer


Short answer, except for the list, they all suck ;-) Depending on your specific situation, you probably want to look into a more fully featured third party mesh like telerik or devexpress.

long answer, it depends on what you want to do.

DataGrid and DataList mainly exist for backward compatibility. GridView and DataList are better than older versions.

GridView is for displaying a grid of data. This gives you CRUD (create update read operations) is mostly free, and it also has paging and sorting mostly free (depending on which data source you are using)



DataList is for when you want a freer list of values.

ListView (and datapager) is our brand spanking new asp 3.5 control and even freer form than DataList. It allows you to customize the layout template to whatever you like and the item template to repeat for each item in the list. You insert a container element (div / panel / placeholder) into your layout template, then you tell the control what it is and it will repeat the element template in it for every item in the list.

You can also point a DataPager control on it and get paging basically for free.

Depending on which site you are using, using the built-in data controls (others, relays and lists) can cause you to paint you into a corner as they have more additional overhead. If it's a small project, it's not a big problem. If this is a large project in which the perfect will be a problem, I would recommend checking the third-party controls again.

+1


source







All Articles