Hi,
First I am totally new to NetAdvantage and your jQuery components :-O. Finding it difficult to even get started :-((. Trying to do data editing with a grid - should be pretty straightforward :-O.
Using VS2010, MVC3 and a backend SQL database.
I added @using Infragistics.Web.Mvc; to the top of my view file, and it does give me SOME intellisense in VS2010 - well I did AFTER using 'Copy Local' for your dll :-O.
BUT - I then look at your 'help files' for igGrid - and they all refer to setting up stuff in javascript - and NOT in C# ???.
Specifically - .Columns - which your sample (
tells me to use - but which just barfs with a 'can't use lambda expression...' error as 'column =>' :-((.
SO - do you recommend using javascript or C# to create and define a Grid ???. All your help seems to suggest javascript :-((.
If javascript - how do I get intellisense please.
Many thanks....
Best regards
Graham
Hi Graham,
The jQuery grid is a 100% client-side control, which also has a MVC wrapper. you can use both JS and C#, depending on your application scenario and the technologies you use (i.e. if you use PHP, then you can setup the grid using javascript only, if you use Microsoft's ASP.NET MVC, you can use the MVC wrapper since it gives you a lot of databinding and intellisense advantages) . You can refer to the following sample code which shows how you can setup the grid entirely in the MVC View, with C# code:
(for example)
http://samples.infragistics.com/jquery/grid/local-sorting => "SELECT SAMPLE SOURCE FILE TO VIEW" => LocalSorting.cshtml or LocalSorting.aspx
Hope it helps. Thanks
Angel
Todor,
Thanks for your response, I am reviewing the referenced document right now - trying still to get my head around this ;-)).
I am starting to understand the view modelling (which I am not currently using !!), BUT - most of your examples and sample code simply code the grids in javascript :-O.
So what (if any) are the advantages of using the View Model - and why don't you offer m(any) samples :-O. I realise that not everyone will be using MVC of course - so thats probably why :-O.
Thanks - persevering with javascript code right now as I am in the depths of it already ;-).
I do hate going back to the dark ages though and having no intellisense or compile time checking on my javascript code :-((. Maybe I am missing some useful tools :-O.
I have my grid with my data and row editing templates set up - and am now fighting with the code to write the data back to my database :-O.
Got as far as the controller - but then I get a JSON barf - as my EF model defines the data table with
[DataContractAttribute(IsReference=true)]
which JSON seems not to like :-O.
Thanks again for your help though - the fog starts to 'clear' after a while....
What type of model are you using? Usuallity the intellisense is not there and the Infragistics() is underlined on red when you don't specify correct model on the view into the Inherits directive.
Have tried the following topic; http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0?page=igGrid_Developing_ASP_NET_MVC_Applications_with_igGrid.html
If it doesn't help please provide us with more details (sample) so we can help you to find faster a resolution of your problem.
Thanks,