RadControls version
|
RadControls for ASP.NET AJAX |
.NET version |
2.0 or above |
Visual Studio version |
2005, 2008 recommended |
programming language |
C# |
browser support |
all browsers supported by RadControls
|
PROJECT DESCRIPTION
I decided to update my older article "
Updating individual Items/Rows inside complex Data controls" now that telerik has released the final version of the RadControls for ASP.NET AJAX but when I was going through the code that I made long ago I realized I didn't need to create special data access and business logic classes when I can easily use LINQ instead.
So here it is, the functionality of this sample is basically the same of the old one, a list of tasks grouped by the list name. When you click on the edit button on each task a textbox appears and you can update the text of the particular task using that form. The important part is how this is handled in the code, as I use RadAJAX to update ONLY the row that is being modified.
The sample uses two simple Repeater controls to display the data, the outer one displays the Lists and the inner/nested one displays the Tasks for each List. This one is loaded on demand firing the itemDataBound event on the outer Repeater. The AJAX functionality is achieved by placing both Repeaters inside two RadAjaxPanels and creating the AjaxSettings at runtime each time a task is bound to its Repeater.
I also added the LoadingPanel to this sample as it has been vastly improved since I wrote the last article, assigning it to the DefaultLoadingPanel property of the RadAjaxManager does the trick, it only covers the inner panel instead of the outer one.
Again I only implemented the edit button, but if you go through the code you will see how easy can be to add the Add/Edit/Delete for the rest of the sample using LINQ.
Remember you will have to rebuild the project if you do changes to the database and refresh the LINQ file in the App_Code folder.
I am using this sample to create a simple forums/threads page to show how easy this is done using RadAJAX and LINQ.
Thanks.