I have big doubts that my question will be answered, but I will try here, since the levels of disappointment are so high that, perhaps, this will help me omit them!
So, I want to do the following:
- Install VS2012 from scratch (okey, click .exe and go!)
- Create a new MVC4 project
- Use the Razor View Engine (it is currently the default)
- MAKE EXT.NET 2.0 WORK FROM ABOVE
This will be a feature of Ext.NET 2.1 , since all requirements will be packaged in the nuGet package, the only problem is that I, as the other few developers would like to use those things that already work now
What i did now:
- After this thread, I installed web.config correctly!
- Make VS2012 recognize Ext.Net link
Here's how:
- Create a new project, select the Basic / Empty / Internet Application templates
- In the resources of your project add a link to Ext.NET.dll (view, search, etc.).
- Edit web.config this way:
http://diffchecker.com/v99ScX0x
- Edit views /web.config as follows:
http://diffchecker.com/7UEK058Y
Hope the diffchecker is clear enough for you to understand, in any case, changes to SAME in both files, they should be like that!
- Add the following line to App_Start / RouteConfig.cs
routes.IgnoreRoute ("{exclude} / {extnet} /ext.axd");
- Now I continue to follow the thread in which I am linked above
- Create a managed one with the name "Examples" โ ExamplesController.cs, no changes are required here.
- Create a view above the controller. So, Views / Examples / Index.cshtml
There, I edited this page a bit to make it more similar to the MVC style, in fact it doesnโt matter. Whole page:
@{ ViewBag.Title = "Infinite Scrolling - Ext.NET Examples"; } @Html.X().ResourceManager() <h1>Infinite Scrolling</h1> <p>The brand new GridPanel supports infinite scrolling, which enables you to load any number of records into a grid without paging.</p> <p>The GridPanel uses a new virtualized scrolling system to handle potentially infinite data sets without any impact on client side performance.</p> <br /> @(Html.X().GridPanel() .Title("Stock Price") .Height(500) .Width(500) .InvalidateScrollerOnRefresh(false) .DisableSelection(true) .Store(store => store.Add(Html.X().Store() .PageSize(100) .Buffered(true) .AutoLoad(false) .Proxy(proxy => proxy.Add(Html.X().AjaxProxy() .Url("/Data/GetData/") .Reader(reader => reader.Add(Html.X().JsonReader() .Root("data") )) )) .Model(model => model.Add(Html.X().Model() .Fields(fields => { fields.Add(Html.X().ModelField().Name("Company")); fields.Add(Html.X().ModelField().Name("Price")); fields.Add(Html.X().ModelField().Name("LastUpdate").Type(ModelFieldType.Date)); }) )) )) .VerticalScroller(scroller => scroller.Add(Html.X().GridPagingScroller())) .ColumnModel(columnModel => { columnModel.Columns.Add(Html.X().RowNumbererColumn().Width(50).Sortable(false)); columnModel.Columns.Add(Html.X().Column() .Text("Company") .DataIndex("Company") .Flex(1)); columnModel.Columns.Add(Html.X().Column() .Text("Price") .DataIndex("Price") .Width(70)); columnModel.Columns.Add(Html.X().DateColumn() .Text("LastUpdate") .DataIndex("LastUpdate") .Width(140) .Format("HH:mm:ss")); }) .View(view => view.Add(Html.X().GridView().TrackOver(false))) .Listeners(listeners => { listeners.AfterRender.Handler = "this.store.guaranteeRange(0, 99);"; listeners.AfterRender.Delay = 100; }) )
So here I am!
If you run your IIS Express, you can run the page in localhost: XXXXX / Examples /
The first problem I have: the page is trying to load localhost: XXXX / extjs / libraries, which is NOT MVC-STYLE!
This is done using @ Html.X (). ResourceManager (), is there a way to make this connection to cdn libraries ? or even change the way! ??
Other problems are likely to arise after this, but now I would like to solve this small painful problem.