Hi!
I want to create a little application with a igGrid control. The data source is an SQL database (in SQL Server). I am not finding an easy way to create just a page showing data in the igGrid and allowing me update data. (I dont need add rows or remove rows, just update some values). I don´t understand how to link the igGrid to SQL server database.
Thanks for your help.
Regards,
Fernando
Hi Fernando,I agree with you that you cannot implement an MVC application within the context of a DNN site.Here's a link to DNN's blog where they confirm that they won't be migrating to ASP.NET MVC:http://www.dotnetnuke.com/Resources/Blogs/EntryId/2464/ASP-NET-MVC-and-DotNetNuke.aspxQuote: DotNetNuke will NOT be migrating to ASP.NET MVC.Thus, I think that if you try to put MVC DLLs in an DNN site, it might work, but then again it could mess the project pretty badly (request routing is the first thing that comes to mind).Hope this helps.
Hi Borislav,
Thank you for your answer, I will take a look and let you know if I have more doubts. Note: what I am trying to do is to create a Dot Net Nuke module, this module needs to include an igGrid, I think I cannot implement a MVC application and put it into a DNN site, do you know a way to accomplish that?
Thanks,
Hi Fernando,I presume you are thinking from the perspective of APS.NET WebForms where page controls (like our Aikido data grid for example) has easy access to the server-side and thus they usually had the functionality you're looking for build in (for example: http://es.infragistics.com/products/aspnet/sample/data-grid/editing-rows-basic-features)With MVC aside, our igGrid is a client-side only control which is absolutely independent from the server-side: it can request and post data to an URL and that's it: it doesn't care how that server-side looks like (is it Java with DB2 or C# with MSSQL Server, for example).Thus the solution I can recommend is to:1. create a WCF service and have a method called "SaveChanges" with the HTTP POST verb.2. You can use the URL to that service method for the grid's updateUrl option so that the grid can post all of its changes to it3. Take a careful look at the Batcing Updates sample for the igGrid - your "SaveChanges" method will have to look like the "SaveChanges" controller action from that sample4. Here's the tricky part: since you will not be using the MVC wrapper for the grid, you will not have access to the LoadTransactions method of the MVC GridModel so you will need to implement that method yourself.5. The good news is that all that method does is to translate the incoming transactions (in JSON format) into the Transaction class. Thus, you can easily use any JSON parser for this purpose and then handle the update to the SQL server database.Feel free to let me know if you have any further questions or trouble.Cheers,Borislav