Beranda
> .NET Framework > ASP.NET MVC JQGrid nuget V.1.1.0
ASP.NET MVC JQGrid nuget V.1.1.0
Update v.1.1.0
- Add Data Annotation Attribute Approach
- Fix some minor issue
new Version of Jq.Grid can be access via nuget
https://nuget.org/packages/Jq.Grid/1.1.0
I make more simple coding by using Data Annotation Attribute
Here Sample to use Data Annotation Approach
Controller
using Jq.Grid.Sample.Models; using System.Linq; using System.Web.Mvc; namespace Jq.Grid.Sample.Controllers { public class HomeController : Controller { // // GET: /Home/ public ActionResult Index() { JQGridModel<invheader> model = new JQGridModel<invheader>("JsonExample"); model.Grid.DataUrl = Url.Action("Data"); return View(model); } [HttpPost] public JsonResult Data() { JQGridModel<invheader> model = new JQGridModel<invheader>(); using (DataContext ctx = new DataContext()) { return model.Grid.DataBind(ctx.InvoiceHeader.AsQueryable()); } } } }
Model
using System; using System.ComponentModel.DataAnnotations; namespace Jq.Grid.Sample.Models { public class invheader { [Key, GridColumn(Visible = false)] public int id { get; set; } [GridColumn(HeaderText = "Invoice Date", DataFormatString = "{0:MM/dd/yyyy}")] public DateTime invdate { get; set; } [GridColumn(HeaderText = "Customer Name")] public string name { get; set; } [GridColumn(DataFormatString = "{0:C}")] public double amount { get; set; } [GridColumn(DataFormatString = "{0:0.00\\%}")] public double tax { get; set; } [GridColumn(DataFormatString = "{0:C}")] public double total { get; set; } [GridColumn(DataFormatString = "{0:C}")] public string note { get; set; } [GridColumn(DataFormatString = "{0:Yes;0;No}")] public bool IsPaid { get; set; } } }
View
@model Jq.Grid.JQGridModel<Jq.Grid.Sample.Models.invheader> @{ ViewBag.Title = "Index"; Layout = null; } <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>JSON Example</title> <!-- The jQuery UI theme that will be used by the grid --> @Styles.Render("~/Content/themes/base/css") <!-- The jQuery UI theme extension jqGrid needs --> <link href="/Content/ui.jqgrid.css" rel="stylesheet" /> </head> <body> <!-- The Partial HTML Grid Table --> @Html.Grid().JQGridPartial(Model.Grid) <!-- JavaScript at the bottom for fast page loading --> @Scripts.Render("~/bundles/jquery") <!-- The localization file we need, English in this case --> <script src="/Scripts/i18n/grid.locale-en.js"></script> <!-- The jqGrid client-side javascript --> <script src="/Scripts/jquery.jqGrid.src.js"></script> <!-- The Grid Script client-side javascript --> @Html.Grid().JQGridScript(Model.Grid) </body> </html>
Full sample can be download at github
https://github.com/aiska/Jq.Grid
Kategori:.NET Framework
More buy cheap viagra online bargains everyday
Its not my first time to pay a quick visit
this web page, i am browsing this site dailly and obtain good data
from here daily.
Have you ever considered about including a little bit more than jusst your articles?
I mean, what you say is fundamental aand everything.
Nevertheless just imaginbe if you added some great images or video
clips to give your posts more, “pop”! Your content is excelleent but with
pics and videos, this blog could undeniably be one of
the greatest in its niche. Terrific blog!
Right here iis the right blog for anyone who really wants to understand this topic.
You realize so much its almost hard to arfgue with you (not that I actually would want to…HaHa).
You certainly putt a new spin onn a topic which has been
written about for decades. Wonderful stuff, just excellent!
I for all time emailed this blog post page to all my associates, as if like to
read it afterward my links will too.
Hi everybody, here every person is sharing these knowledge, so it’s fastidious to
read this weblog, and I used to pay a visit this web site every day.
Simply wish to say your article is as amazing.
The clearness in your put up is just great and that i can think you are a professional in this subject.
Fine together with your permission let me to clutch your feed to stay
updated with impending post. Thanks a million and please keep up the
rewarding work.
My spouse and I absolutely love your blog and
find the majority of your post’s to be just what I’m looking for.
Do you offer guest writers to write content in your
case? I wouldn’t mind producing a post or elaborating on a number of the subjects you write regarding here.
Again, awesome web site!
Wonderful goods from you, man. I’ve be mindful your stuff prior to and you’re just too magnificent.
I actually like what you have received right here, certainly like what you are stating and the way in which wherein you are saying it.
You are making it entertaining and you still take care of to keep it
smart. I can’t wait to read much more from you. This is really a
wonderful site.
I was very happy to find this website. I want to to thank you for your time just for this wonderful read!!
I definitely appreciated every little bit of it and
I have you book marked to check out new things on your web site.
Thaat is a good tip especially to those fresh to the blogosphere.
Brief but very accurate information… Aplreciate your shnaring this one.
A must read post!
Hi there to every one, for the reason that I am actually keen of reading this website’s post to be updated
on a regular basis. It consists of pleasant data.
Pest Control Manchester is committed to shielding their house plus organizations against
damaging pests. We provide some kind of eco
safer, superior and also trustworthy solution and are
also dedicated to overall client satisfaction.
Due to the fact trusted service team into the cheap
cheshire pest control market we provide
the highest standard of pest control at a
really price-effective cost.
Howdy! Have you any ä°dea if they make
plugins to protect against hackers?
Recently there a variety of alternatives to examine because the levels incorporate a great level of lightweight homes,
condominiums, as well as townhouses. It’s wise to appreciate the particular completely because of the
various colleges, retailers, as well as recreational locations in your community; and that is essential as well to get
a sense together with the worth of more property inside quick place.
If it you are presently looking for qualities easily obtainable in Houston you just need
to look over as numerous of your options as possible.
We harvest contact details like title, where you can find more severe solution demands, blends all of them with the
design equipment technicians and complete the project can be easily bought.
Trishul concrete mixing herbal is available to you personally along with your remote control building
equipment. Most suppliers including” old, rusty and fuel. six percentage in order to 14, 075. Tiny batch mixers of lower than 3 years, purchases are available in the development of extraordinary as well as astounding tissues.
Very nice write-up, what I happened to be interested in.
Things are extremely available with a rather obvious explanation associated with the challenges.
It was truly educational. Your internet site is beneficial.
Thanks for revealing
I absolutely enjoy it when individuals come together as well as promote horizon. Big weblog,
stick to it!
I think this is just about the most substantial details for me personally.
I am also pleased reading through your own article.
But should remark about some common things, This site style is best, the articles or blog posts
was really big : D.
Thanks a lot, I’ve been on the lookout for details about this specific topic question for a long time as well as your own is the best I’ve uncovered at
this point.
darmowe automaty hazardowe manage gry hulk
Undoubtedly youngsters baseball drills will help the abilities from the baseball
teams. ” Loews enjoy Pets need some thing unique with regard to humans plus dogs. Furthermore, you need to be ready and big speakers that offer a lot of volume for your disco hits. When you’ve got been in the commitment for some time you can easily being complacent plus save money opportunity collectively rather than additional. The actual ready additionally happens and fifty-two flash cards that are familiar with assist your child enhance their running increase as well as class comprehension.
darmowe automaty hazardowe perform gry hulk
Do you have a junk e-mail issue on this blog site;
I additionally am a blogger, and I also got curious about your situation; we’ve got developed
several wonderful techniques therefore would like to change methods with other people, make sure to
capture me an e-mail in the event that curious.
I have find out numerous superb material right here. Certainly value
bookmarking when it comes to revisiting. I wonder how a lot effort your place to build this kind of fantastic helpful website.
darmowe automaty hazardowe perform gry hulk
Exceptional web site you have right here but I became curious about
should you decide know of any message boards that
cover the same information discussed in this article?
I’d like to getting a part of neighborhood where I can obtain information off their
experienced individuals that express exactly the same interest.
For those who have any ideas, kindly let me know. Thank you!
It’s proper time for you to make some programs for the future and
it’s really time for you to be delighted. You will find check
this out posting and when I really could If only at advise your some interesting methods or perhaps methods.
Perhaps you might write further content making reference to this post.
If only to see a lot more reasons for having information technology!
Hair is the proteins filament that grows from follicles based in the dermis,
or even complexion. Locks are one of many determining attributes of animals.
I believe that is among the these a large number important information for me
personally. And that I amm glad reading your post.however wajt in order to statement about couple of popular actions, your website
style is ideal, the actual content is actually very nice :
D. Great activity, cheers
Terrific services! That is the kind of resources which should be shared across the internet.
Pity on Google for no lengthier positioning this publish higher!
Come on complete plus talk over with my website .
Thanks a lot =)
Great things away from you, man. I’ve keep in mind your items past to
and you’re just also impressive. I really including that which
you need obtained here, really like what you’re expressing and exactly how for which where a person claim it.
You will be making information technology interesting and you also
nonetheless take care of to keep it smart. I can’t waiting to see significantly
more from you. This is actually a tremendous web site.
Hello there, I found the blog through Bing concurrently because
seeking a relating subject, your internet site emerged,
it seems in order to wind up as great. I have bookmarked information technology during my google bookmarks.
Hey me personally posting that you simply really set of superb highlighted plus
tune into the close skills you really gorgeous sounds combine jointly so that as soon as I put the possible opportunity
to ever earlier head to North america but also communicate with would certainly be our
1 larger want is actually generally for connecting with you once more whether no
I could end up being with someone maybe have a great time together
with I truly may fill the desire. I genuinely try not to necessarily recognize when you should
get back to the particular european union but feel several it is maybe not
virtually therefore probably perhaps even will be
prejudicial . but me personally while any individual
whenever you want feel capable of visit the american, but also
undoubtedly I might always be content whenever we have your private activities
inside the idle ever before have actually observed.
I wish all to you the number one for the group
every achievement as well as provides exceptional behavior particularly good in the
management. Once again when precisely the ideal for any kind
of wonderful day.
For most new development you may have also go in order to discover thee web and on intternet
I discovered this great site since the finest web site for current revisions.
I have been surfing online significantly more than three time today, however
we never ever located any kind of fascinating write-up like your own website.
It is very well worth enough for me personally. In person, whether all webmasters and also writers made great contents whenever performed, the
web will be even more helpful than ever before.