Steps to be taken to implement JQgrid in MVC4 Razor,using Entity Framework - asp.net-mvc

I am new to this MVC and JQuery, i started building small application using these, i am using MVC4 Razor ,with Entity Framework. i fallowed few online tutorials for the. but nothin is working out properly. i am able to get my Json data from my controller but the data is printing on my view as a java script array, jqgrid is not displaying, i guess my jqgrid itself is not called, or its not being referenced properly. please tel me what are all the things need to do, and directory structures to be fallowed.
Thanks in Advance

You can easily get jqGrid and other Grids like Telerik from Nuget Package Manager. Each of them must using their own inbuilt functions to handle the events. You will have to learn them to implement it. You can check demos from below link:
jqGid:
[link] http://www.trirand.com/blog/jqgrid/jqgrid.html
Telerik:
[link] http://demos.telerik.com/kendo-ui/?mvc
[link]http://demos.telerik.com/aspnet-ajax/

Related

add pagination control for asp.net mvc

I am new to asp.net MVC. I am trying to understand how to add pagination for a list of items using MVC without code for a view. I am using nunit testing to check whether pager option is tested or not
There is no built-in pagination for a vanilla MVC project -- you'll need to write one yourself or find something off the shelf.
See PagedList, which is also available on NuGet.

Providing a partial view in an ASP.net MVC4 code library?

I've been writing a code library for ASP.net MVC4 I'm called "ExpressForms". The idea is to automate common coding tasks associated with displaying tabular data.
Recently, I started writing code that will automatically display a "filter" widget for each column in the grid so that the user can type to find certain records. The filter automatically adapts to the data type associated with each column and adds a rich set of features, such as autocomplete, and page state bookmarking.
To implement these features, I've created some partial views that the associated classes use to output HTML to render these widgets.
The issue I have is that once someone downloads the library, they must manually copy the partial views to their ASP.net MVC4 project! Is there a way to configure my library (which is a .net class library project) so that a developer who downloads my library doesn't have to manually copy the partial views into his web project?

Entity Framework + MVC 4 + Knockout.js AddView templates?

I've been messing around with knockout.js a little bit lately and it seems like it has a lot of promise. However, I can't seem to find any good Code Templates (aka t4 templates or .tt files) for it.
My GUESS is that the only changes that we would need would be on the view side, not the controller side, but I'd be up for looking at new controller templates too.
Where I am right now:
Create a new MVC 4 project
Using NuGet, install entity framework 5, jquery, jquery ui, and knockout
Create a .edmx model by reverse engineering your existing database with Entity Framework
Drag C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC 4\CodeTemplates from Explorer into the root of your project
Delete CodeTemplates\AddController
Highlight all of the items in CodeTemplates\AddView\CSHTML and blank out the text in "Custom Tool" in properties to keep them from
building
Start screwing around with Create.tt and Edit.tt to add in knockout code.
Goal Expected Input: Right Click > Add Controller ... > MVC Controller using EF
Goal Expected Result: Controller & View created using EF with knockout code already in place.
If you use something similar to knockout that you like more, I'd love to hear about it!
Also, is it necessary to use addons like MVCScaffolding? It seems like you could just customize the existing templates and get the same results.
Thanks for your time!
I would go the MVCScaffolding route. You could create your own custom scaffolding script whenever you wished to add a controller, that is, as long as you can stomach PowerShell.

Grails JQGrid 4.0

This problem also concerns my question regarding the multiple grouping inside the JQGrid using the <jqgrid:grid> tag. But as I later found out here in the changelog of JQGrid, there might be issues with the grouping feature of JQGrid version 3.8.0. I've tried using the scripting format of JQGrid presented here
So in theory, I would download JQGrid 4.0 and use it in the concerned project.
The question is how can I use the downloaded JQGrid 4.0 files to my project.
In the case that you can't find a Grails plugin that uses the version of jqGrid that you need, you could go the more direct route of downloading jqGrid.
Just put the js file in the webapps/js folder of your grails project and then include the source on whatever gsp pages you need. You wouldn't get whatever ease of use you get from the Grails plugin, but if you absolutely need the newest version of jqGrid without waiting for a Grails plugin update, then there ya go.

ASP.NET MVC Server File Browsers

On my current project we would like to expose some server directories to the client so they can control their own assets/static HTML/CSS etc. The existing web forms project is being replaced by MVC and I am struggling to find an out of the box server file browser with which to expose this functionality.
Here is an example for WebForms: Telerik FileExplorer demo
Can anyone recommend a decent alternative which is designed for the MVC framework? We don't mind paying license fees, however something extensible and preferably open source would be better :)
Look for some jQuery,Ajax based file managers
some links to start with
http://plugins.jquery.com/project/SFBrowser
http://riderdesign.com/articles/Build-a-file-tree-explorer-with-jQuery-and-ASP.NET.aspx
jQuery File Tree works well for me.
It is read-only and you can set root directory and other options.
It has an ASPX connector included in package.
[Full Disclosure: I work for Telerik.]
Telerik has not yet recreated the RadFileExplorer reusable UI experience for MVC, but we do have a powerful Treeview in our open source Telerik Extensions for ASP.NET MVC. Using the Treeview, you can easily create a server file explorer using techniques similar to those in the RiderDesign article highlighted by Ajay. One advantage of using the Telerik Extensions vs. something like a JavaScript UI plug-in is that you get server and client-side rendering, improving your application's accessibility and behavior in non-JS clients.
You can learn more about using the Treeview in these online examples:
http://demos.telerik.com/aspnet-mvc/TreeView
Hope that helps.

Resources