Manual CRUD operations with the Telerik RadGrid control
I have been working on a project lately that was already using the Telerik ASP.NET Rad Controls suite. One of the new features was a fully editable web-grid, so I chose to use the existing ajax-enabled RadGrid control to speed my development. I chose to use a 3rd party control, mostly due to time constraints since the project required a grid with inline-editing, full CRUD operations, plus custom column templates, all with heavy Ajax support to avoid postbacks and excessive page size.
I soon discovered, the Telerik controls are nice tool for simple uses where you can use asp.net DataSource controls and automatic databinding, but not so much if you need to get “fancy” with your implementation. In my case I needed to do 2 things that cross over into the grey area where these controls excel.
Also see: ASP.NET MVC in CodePlex and Extensible Unit Testing
First, I’m using an early 2.0 version of NetTiers for the DAL (with Service Layer implementation) with custom mods to the entities as the datasource, and second, I’m doing some aggregate custom ItemTemplates that require custom data-binding.
This lead to extreme complexity in the implementation because, A) this version of NetTiers’ had problems with properly generating CRUD operations for its EntityDataSource controls (NetTiers entities mapped onto a custom ObjectDataSource style control) which prevented me from using the declarative model, and B) the RadGrid control simply sucks if you cannot use automatic databinding and if you require custom databinding logic.
(more…)