All rows editable

Jan 12, 2011 at 8:25 PM
Edited Jan 12, 2011 at 8:26 PM

Hi, I want to know using your toolkit how we can make all rows as editable in a datagrid. Like we can do with gridview. Kindly let me know, if its possible.

thanks,

Khuzema

Coordinator
Jan 13, 2011 at 4:10 PM

Hi Khuzema,

I don't understand what do you mean exactly with "editable as in gridview". Anyway, To make all rows editable you just need to supply an Edit Item templete containing text boxes or other input fields, and then using the provided buttons to enter in edit mode. One can enter in edit mode with several rows simultaneously. When the user finish editing he press a submit button and the content of all rows in edit mode is transferred into a collection of the view model, then you can record them into a database. For more details please downolad the comple example in http://mvccontrolstoolkit.codeplex.com/releases/view/55755

end refers to the tutorials in my blog:

http://www.dotnet-programming.com/post/2010/10/30/Defining-MVC-Controls-2-Using-the-DataGrid.aspx

http://www.dotnet-programming.com/post/2010/11/15/Defining-MVC-Controls-3-Datagrid-Sorting-and-Master-Detail-Views.aspx

 

please read crefully the tutorials and then analyze also the code of the complete example carefully. You can also refer to the documentation page:

http://mvccontrolstoolkit.codeplex.com/documentation

Jan 14, 2011 at 10:48 PM

Hi,

Thanks for your reply, what I mean that all rows to be editable using some sort of template like in gridview. So user can edit all the rows and submit it once. As suggested by you I will go thru the documents in more details. By the way I am talking about MVC 3 with razor. I hope your control will support that scenario.

Khuzema

Coordinator
Jan 15, 2011 at 9:24 AM

Yes my Datagrid do EXACTLY this, you can edit all rows and than submit them once. Moreover, you can delete, and add rows and the whole set of changes is processed in a single submit. in case of validation  errors the user is returned the same datagrid modified an he has the opportunity to continue editing to correct all errors and also to undo some of his previous changes or all changes.

About MVC 3, the 0.7 version that you downloaded has been compiled with MVC2. However, next week I will release the 0.8 version that will have a distribution specific for MVC 3 that will be also compatible with unobstructive client side validation.

I suggest you to study my examples that are in MVC 2,...in the meantime I will release the 0.8 version that you will use in your actual project....just a few days...sorry for being some days later after the release of the MVC 3 RTM.

 

Jan 15, 2011 at 10:15 PM

Thanks a lot, thats solves my problem as you mentioned that datagrid can edit all rows. I hope there is the example in your tutorials. I will get back with update and also waiting for the new release. Thank you once again.

Jan 31, 2011 at 8:43 PM

Gone thru the new version 0.8, its been nice. As I mention earlier how we can use the MVC Control with the razor view engine. Any help would be appreciated.

 

Thanks

 

Coordinator
Feb 1, 2011 at 3:53 PM
Edited Feb 1, 2011 at 3:54 PM

Hi Khuzema,

Using the Razor engine with the Mvc Controls Toolkit is easy, you need just to substitute the aspx and asch view and partial views with razor views.

Using my helpers in each Razor View is as easy as using the standard helpers! For most of cases you just need to put a @ at the left of my helper....and done....you can use it... passing all parameters it needs.

Anyway, in a short time(a couple of days) I will make available for download the Razor engine version of the complete example that now is available only with the aspx View engine. In a short time I will also post a new tutorial on my blogs about the new features of the Mvc Controls Toolkit.

Sorry, fo the delays but there was a problem with an unobtrusive validation parsing function of MVC3 that doesn't work ....so I waited a little for an official fix, ...and then I inserted a fix in my js file.

Feb 2, 2011 at 5:49 AM
Edited Feb 6, 2011 at 8:07 PM

Thank you,

Feb 6, 2011 at 8:08 PM

Any idea when the razor related sample application can be released?

Coordinator
Feb 6, 2011 at 8:27 PM

Hi,

I just today posted a new tutorial on my Blog. I hope to release the example tomorrow

Coordinator
Feb 7, 2011 at 5:12 PM

The Razor Example is available for download in the download page for the 0.8 release. Enjoi! :)