-
28 Feb 2012 9:33 AM #331
I've been slowly working on updating it for Ext JS 4.x and ASP.NET MVC 3. I made a lot of changes to how you configure and use the library. For example, by default no configuration is required at all, unless you want to customize something.
I've been pretty busy at my real work lately, but I will try to release something soon. Maybe within a week or two. Stand by
Eugene
Ext.Direct for ASP.NET MVC
-
28 Feb 2012 2:56 PM #332
Just came across this today - looks amazing! Definitely looking forward to the update!
-
4 Mar 2012 3:25 AM #333
-
19 Mar 2012 10:16 AM #334
Alright, guys. Just uploaded the new version of the library. It has been rewritten to make it easy to start a new project with it or to convert existing one from using regular AJAX requests to Ext Direct.
No backward compatibility with earlier versions!
Go to the first post for more info and all the links.
Make sure to read the documentation! Especially the Quick Start section if you're just starting.
Let me know what you think. Questions are welcome.Eugene
Ext.Direct for ASP.NET MVC
-
27 Mar 2012 2:52 AM #335
Changing Direct JSON serialization
Changing Direct JSON serialization
Hi all!
I know that by default Direct use Newtonsoft library for JSON serialization. I wonder if there is any posibility to replace the serialization implementation with a custom one? (e.g. with DataContractJsonSerializer from Microsft)
Thanks,
Ovidiu
-
27 Mar 2012 6:11 AM #336Eugene
Ext.Direct for ASP.NET MVC
-
9 Apr 2012 4:46 PM #337
DataRow as a JSON result
DataRow as a JSON result
Thank you for this well written Ext.Direct. The demo is a great too. I am able to return DataTable as a "data" for Json result to bind it to a ExtJs Grid Panel.
However, I had to use some generic object (in my case a DataRow) to bind to Ext JS Form Panel. When I send the JsonResult with the DataRow as data, the form panel is not binding. Here is the code snippet for the LoadData,
I tried sending the data as Json string (by converting DataRow to Json string), no luck either, see the code below,Code:[ActionName("GetData")] // Action alias public ActionResult LoadData(int rowId) { DataRow dr = GridData.GetDataRow("Employee", rowId); return Json(new { success = true, data = dr }); }
Note: If I send data as any concrete POCO object to a ExtJs Form Panel it binds and shows data as expected. It is just the generic dynamic object that I am sending is not binding to ExtJs Form. I am sure I am missing something here to make it to work.Code:[ActionName("GetData")] // Action alias public ActionResult LoadData(int rowId) { DataRow dr = GridData.GetDataRow("Employee", rowId); return Json(new { success = true, data = GetJson(dr) }); } public string GetJson(DataRow r) { int index = 0; StringBuilder json = new StringBuilder(); foreach (DataColumn item in r.Table.Columns) { json.Append(String.Format("\"{0}\" : \"{1}\"", item.ColumnName, r[item.ColumnName].ToString().Replace("\"", "\\\""))); if (index < r.Table.Columns.Count - 1) { json.Append(", "); } index++; } return "{" + json.ToString() + "}"; }
I really appreciate any help to achieve this. THANKS!!!
-
18 Apr 2012 11:48 PM #338
I'm give a try to implement Ext.Direct but I'm stuck at:
The example works fine, compare the configs but everything is the same.PHP Code:GET http://localhost:54323/directapi 404 (not found)
Do I forget something or what I'm doing wrong?
Thanks!
-
18 Apr 2012 11:51 PM #339
Does this work?
GET http://localhost:54323/Direct/Api
Ext.Direct for ASP.Net MVC uses the Router mechanism MVC uses. (kinda
).
Just check the example with Firebug or Webkit Dev tools to see what url is used to get the direct api.
Good luck!
-
18 Apr 2012 11:56 PM #340
Nope doesn't work, the example uses
I think a need someCode:<scripttype="text/javascript"src="/directapi"></script>



Reply With Quote