A Simple Data Grid for ASP.NET MVC 3 and 4 - Part 2

preview_player
Показать описание
In part 2 of the Simple Data Grid for ASP.NET MVC 3 and 4 series, we will add CRUD operations (create, read, update, delete) to our Grid which we created in part 1.

Рекомендации по теме
Комментарии
Автор

ASP.NET MVC is a different mind set than web forms. You basically get full control over every aspect of your site, but it comes at a price. Personally, having spent a good 8 years with Web Forms before moving to MVC, i found it very liberating to have full control over the HTML and have been finding myself doing more work with MVC then Web Forms this past few years. That is not to say MVC is everyone's cup of tea, and Microsoft will support both going forward based on their statement.

digioz
Автор

That's actually pretty easy to do. All you have to do is to make the ID field data a hyperlink, and pass the id value to the details page url as a parameter.

digioz
Автор

It depends how you installed SQL on your PC or Server. If you installed it in Mixed mode, your username would be "sa" with whatever mode you installed it in. If not your "DBPerson" connection string would be Security=SSPI;".

digioz
Автор

Thank you very much . Your video demonstration is so simple, that now I have to try the webgrid. Very familiar with the viewgrid, webgrid might be my alternative in mvc.

blrm
Автор

Open the web.config file in the root of the project, and find the XML Node "connectionStrings". Inside of it, you will find a single line of XML which contains "User Id" and Password. Set the value of those two to your SQL credentials.

digioz
Автор

You are welcome. Are you interested in more ASP.NET MVC Data Grid related tutorials in specific or are you looking for other topics. I am open to suggestions if you have a specific suggestion.

digioz
Автор

Keep in mind these are videos for entry level programmers. So yes, I think 20 minutes is the least amount of time that needs to be spent to teach them this.

digioz
Автор

Please share Part 3, I am eagerly waiting for more videos on MVC

kiruthikalaxmijagadish
Автор

Hi it would be awesome to integrate the action link buttons to another data columns. For example, adding a Detail link to the ID column. Great tutorial btw

morillo
Автор

You will have to use AJAX to do that. Take a look at Ajax Grid, which allows you to do that.

I will also keep it in mind for Part 4 of this tutorial!

digioz
Автор

Thanks, for your quick response and considering it as part 4.is there any links which gives a brief idea about that by the time you create the video..it would be helpful.
thanks again for your time.

girishsp
Автор

Part 3 will be about styling the Grid table. It is currently in the works.

digioz
Автор

Thank you for your useful tutorial will you do more tutorials 😁

sergiocakmak
Автор

Sure. Since YouTube does not allow posting links in comments I will send you a few links directly.

digioz
Автор

That will be shown in Part 3 of this tutorial, on which I am working on now.

digioz
Автор

wow!!..worthy 20 mins..but one quick question.i coded in web forms for 2.5 years and just entered MVC world..one thing i would like to know if we can EDIT a record inline like we do in web forms..instead of navigating to a different UI and update it there only if so could you point me in right direction? i know it created 4 razor engine files(cshtml) for CRUD operations..just a question?

girishsp
Автор

Make sure that the user id and password that is specified in the source code actually exists on your local SQL Server. Otherwise your database connection won't work.

digioz
Автор

I have a problem with borders. How can I add horizontal and vertical lines between my table elements?. Thank you.

ospirentos
Автор

i only find "Person (MvcGrid1.Controllers)" no "Person (MvcGrid1.Models) even after I rebuild the solution! and when I run it after, i have  An exception of type occurred in EntityFramework.dll but was not handled in user code!
what's wrong?

kabiziable
Автор

I have a separate video titled "Data First CRUD Operations using Entity Framework" which is on my YouTube Channel here. Please have a look at that video. It should answer your question.

digioz