Question

I have been using gridview since a long time. I have a "cant live with you and cant live without you" relationship with it.

The idea of Edits, inserts and deletes from within the grid is great but having to do something like

var sometext = ((TextBox)editRow.FindControl("tbSomeText")).Text;

just seems very un-clever to me. Has anyone comeup with a solution or knows (resource) where you perform CRUD operations + paging and sorting from within the grid and dont have to write ugly code (like above). I am not looking for solutions using DataSource objects since I am not its biggest fan. I will be happy if someone can tell me how to live without GridView in asp.net.

I understand there are AJAX implementations but I am looking for something completely serverside.

Was it helpful?

Solution

If you are trying to make a basic CRUD website, have a look at ASP.NET 3.5 Dynamic Data which is a great website to add as a pure data access website with CRUD ability. However, its extremely customizable.

Gridview has its advantages and I used to love it in the .Net 2.0 times about two/three years ago. However, since then there are much better .Net 3.5 controls (like ListView) that give you a better ability to customize content. I'd also have a look at many third party grid tools from (Telerik, Infragistics, ComponentArt, ComponentOne, DevExpress) that have a lot more capability than the inbuilt gridview control.

OTHER TIPS

I always use repeater control instead of others. Because i feel free with it. I build up the html by myself and can do a lot of thing like paging sorting. But of course you need more effort for the repeater for these kind of functionality.

For CRUD operations, i use jQuery thickbox (modal pop up and iframe).

My choice is Repeater

I despise it, every time I've used it or seen another developer use it, they almost always end up going with something else. I've never once heard any developer I've worked with say "I love GridView".

You can hook up the GridView and DetailsView and use basic SQL scripting or complex business objects along with DetailsView.

I have found DetailsView to be very useful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top