Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET C#4.0 MVC VB.NET
I am new to MVC development.
 
I have mostly worked on webforms.
I can display data from table in a tabular format in MVC view and wish to edit a row on that same page as in happens when we click edit in Gridview control.
 
What I thought for this was to keep textbox (visible false) with label and set them visible when edit link is clicked.
Is my approach in right direction?
 
Please let me know the logic.
Posted 13-Jan-11 20:51pm
Edited 13-Jan-11 23:05pm
Dalek Dave432.4K
v3
Comments
Dalek Dave at 14-Jan-11 5:05am
   
Edited for Readability.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Possibly have a look into the Telerik MVC controls, I'm really liking the presentation + fluent syntax
 
The controls are free and open source.
 

This demo looks like it will do exactly what you're after. The nice thing is you have to choice of either server side 'postback' behaviour or implementing AJAX editing
 
'Server Editing'
http://demos.telerik.com/aspnet-mvc/Grid/EditingServerSide/3?mode=InLine&type=Text&Grid-mode=edit[^]
 
'Ajax Editing'
http://demos.telerik.com/aspnet-mvc/grid/editingajax[^]
 

 
Quite a few people using them and some full walkthroughs out there
 
http://weblogs.asp.net/rashid/archive/2009/11/05/using-telerik-mvc-grid-in-crud-scenario.aspx[^]
  Permalink  
v3
Comments
Amit Kumar Tiwari at 15-Jan-11 7:06am
   
Thanks Dylan, but as a developer I rely more on making my own controls. I will be glad if can make that functionality myself (I know I wont get Nobel prize for that) but just for self satisfaction ;)
 
I wish I could get the inside logic for the same.
Dylan Morley at 16-Jan-11 8:47am
   
Well, the controls are open source, so why not read the source code & see how they've implemented it? Then you can do something similar in your own code.
Dalek Dave at 22-May-11 6:24am
   
Good Answer
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Give a look to my Mvc Controls toolkit : http://mvccontrolstoolkit.codeplex.com/[^]
 
see here a grid working: http://mvccontrolstoolkit.codeplex.com/wikipage?title=DataGrid%20and%20Pager%20Complete%20Example[^]
 
Here you can find also a lot of other useful controls like a treeview
  Permalink  
Comments
Dalek Dave at 22-May-11 6:24am
   
Good links.

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

  Print Answers RSS
0 CPallini 375
1 Sergey Alexandrovich Kryukov 370
2 BillWoodruff 314
3 George Jonsson 279
4 OriginalGriff 217
0 OriginalGriff 5,030
1 CPallini 4,225
2 Sergey Alexandrovich Kryukov 3,604
3 George Jonsson 2,831
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 22 May 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100