jQWidgets Forums
Forum Replies Created
Viewing 3 posts - 1 through 3 (of 3 total)
-
Author
-
March 3, 2017 at 4:09 pm in reply to: VS 2017 + ASP.NET + Angular 2 VS 2017 + ASP.NET + Angular 2 #92058
check your webpack.config.js. This is working for me –
module: {
loaders: [
{ test: /\.ts$/, loader: ‘ts’, query: { silent: true } },
…March 3, 2017 at 4:05 pm in reply to: ASP.NET Core + Angular 2 template for Visual Studio ASP.NET Core + Angular 2 template for Visual Studio #92056Working. Had to change webpack.cnfig.js to
{ test: /\.ts$/, loader: ‘ts’, query: { silent: true } },November 16, 2015 at 8:12 pm in reply to: error with dataAdapter using .asmx ASP .NET json data error with dataAdapter using .asmx ASP .NET json data #78222For anyone looking to see how I solved this issue:
[WebMethod(EnableSession = true)] [ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)] public object GetIntellisense(/*string corrkey, string reportName, string paramName,*/ string pattern) { try { Context.Response.Clear(); Context.Response.ContentType = "application/json"; using (var proxy = GTS.Client.GTSWebServiceFactory.CreateReportProxy()) { List<Intellisense> intellisenseList = new List<Intellisense>(); List<string> names = proxy.GetReportIntellisense("DocumentActivity", "DocumentSearch", pattern + "%"); for (int i = 0; i < names.Count; i++) { Intellisense x = new Intellisense(); x.Name = names[i]; intellisenseList.Add(x); } proxy.Close(); JavaScriptSerializer js = new JavaScriptSerializer(); string json = js.Serialize(intellisenseList); object oJson = js.DeserializeObject(json); // needed to deserialize object before returning. return oJson; } } catch (Exception exc) { GTS.Logging.Log.Warn("error getting intellisense", exc); throw new Exception(exc.Message); } }
$("#documentName").jqxInput({ source: function (pattern, response) { var dataAdapter = new $.jqx.dataAdapter ( { type: 'POST', dataType: 'json', async: true, url: "Reports.asmx/GetIntellisense", datafields: [ { name: 'Name', type: 'string' } ], cache: false, contentType: 'application/json; charset=utf-8', }, { autoBind: true, formatData: function (data) { data.pattern = pattern; // make sure name is same as paramater return JSON.stringify(data); // Needed to stringify data }, loadComplete: function (data) { if (data.d.length > 0) { response($.map(data.d, function (item) { return item.Name })); } }, loadError: function (xhr, status, error) { alert(error + xhr.responseText); } } ); }, placeHolder: "Enter a document name", height: 25, width: 200, theme: theme, minLength: 1 // MINIMUM 1 CHARACTER TO START WITH. });
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)