invalid workspace configuration: case mismatch in path in golang - go

After installing golang using homebrew I am getting this see below screenshot error in my vscode and IntelliSense is not working as well.
I have no idea how to resolve this any help would be great.
FYI : I did install all the extension recommended for golang in vscode .
vs code
Settings.json
{
"workbench.iconTheme": "vscode-icons",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.colorTheme": "One Dark Pro",
"tabnine.experimentalAutoImports": true,
"editor.fontSize": 18,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.editorAssociations": {
"*.ipynb": "jupyter.notebook.ipynb"
},
"cSpell.userWords": [
"Aditya",
"Bluespacelabs",
"Formik",
"Highcharts",
"Kumar",
"Palin",
"semibold"
],
"[dart]": {
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.rulers": [
80
],
"editor.selectionHighlight": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.tabCompletion": "onlySnippets",
"editor.wordBasedSuggestions": false
},
"gitlens.advanced.messages": {
"suppressImproperWorkspaceCasingWarning": true
},
"editor.tabSize": 8,
"editor.cursorStyle": "line",
"editor.insertSpaces": false,
"editor.lineNumbers": "on",
"editor.wordSeparators": "/\\()\"':,.;<>~!##$%^&*|+=[]{}`?-",
"editor.wordWrap": "off",
"diffEditor.wordWrap": "on",
"json.schemas": [
{
"name": "vscode-expo-manifest",
"url": "file:///Users/adityakumar/Library/Application%20Support/Code/User/globalStorage/bycedric.vscode-expo/manifest-42.0.0.json",
"fileMatch": [
"app.json",
"app.config.json"
]
}
],
"eslint.format.enable": true,
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
}

Related

Laravel mix is not building Vue 3 TS assets

I have a fresh Laravel 9 app with Vue 3 SPA built with TS (using Metronic 8.1 template) and I'm using webpack. Whenever I try to build the assets, it stays stuck at 12% and then does absolutely nothing.
Running Laravel using Sail on WSL2. After doing some research I found out that it could be a memory issue, so I tried to change this like so:
.wslconfig
[wsl2]
memory=10GB
localhostForwarding=true
And then running Restart-Service LxssManager as administrator.
However, nothing I've tried so far seems to work. I have another Laravel 9 app in a different container, which does not use any framework and uses vanillaJS and that compiles no problem. Any help here?
webpack.mix.js
const mix = require("laravel-mix");
const path = require("path");
mix.ts("resources/ts/app.ts", "public/js")
.vue({ version: 3 })
.webpackConfig({
module: {
rules: [
{
test: /.mjs$/i,
resolve: {
byDependency: { esm: { fullySpecified: false } },
},
},
],
},
resolve: {
alias: {
"#": path.resolve(__dirname, "resources/ts/src/"),
},
},
});
.tsconfig.json:
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noImplicitAny": false,
"target": "es5",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"paths": {
"#/*": [
"resources/ts/src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
"include": [
"resources/ts/src/**/*.ts",
"resources/ts/src/**/*.tsx",
"resources/ts/src/**/*.vue"
],
"exclude": [
"node_modules"
]
}

Is there any information about the possibility of creation entity records in EntityMetadata?

Here is the documentation EntityMetadata EntityType where all the properties of an entity are described.
I can not find any property that can describe the possibility to create a record of this entity type there.
How can I figure out that this entity type supports the creation of records?
As an example - activitypointer EntityType supports only Operations Supported GET, but in the entity metadata description, there is nothing related to it.
ActivityPointer EntityMetadata
{
"ActivityTypeMask": 1,
"AutoCreateAccessTeams": false,
"AutoRouteToOwnerQueue": false,
"CanBeInCustomEntityAssociation": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canbeincustomentityassociation",
"Value": false
},
"CanBeInManyToMany": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canbeinmanytomany",
"Value": false
},
"CanBePrimaryEntityInRelationship": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canbeprimaryentityinrelationship",
"Value": false
},
"CanBeRelatedEntityInRelationship": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canberelatedentityinrelationship",
"Value": false
},
"CanChangeHierarchicalRelationship": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canchangehierarchicalrelationship",
"Value": false
},
"CanChangeTrackingBeEnabled": {
"CanBeChanged": true,
"ManagedPropertyLogicalName": "canchangetrackingbeenabled",
"Value": true
},
"CanCreateAttributes": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreateattributes",
"Value": false
},
"CanCreateCharts": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreatecharts",
"Value": true
},
"CanCreateForms": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreateforms",
"Value": false
},
"CanCreateViews": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "cancreateviews",
"Value": true
},
"CanEnableSyncToExternalSearchIndex": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canenablesynctoexternalsearchindex",
"Value": false
},
"CanModifyAdditionalSettings": {
"CanBeChanged": true,
"ManagedPropertyLogicalName": "canmodifyadditionalsettings",
"Value": true
},
"CanTriggerWorkflow": false,
"ChangeTrackingEnabled": true,
"CollectionSchemaName": "ActivityPointers",
"DataProviderId": null,
"DataSourceId": null,
"DaysSinceRecordLastModified": 0,
"Description": {
"LocalizedLabels": [
{
"HasChanged": null,
"IsManaged": true,
"Label": "Task performed, or to be performed, by a user. An activity is any action for which an entry can be made on a calendar.",
"LanguageCode": 1033,
"MetadataId": "499709b3-2241-db11-898a-0007e9e17ebd"
}
],
"UserLocalizedLabel": {
"HasChanged": null,
"IsManaged": true,
"Label": "Task performed, or to be performed, by a user. An activity is any action for which an entry can be made on a calendar.",
"LanguageCode": 1033,
"MetadataId": "499709b3-2241-db11-898a-0007e9e17ebd"
}
},
"DisplayCollectionName": {
"LocalizedLabels": [
{
"HasChanged": null,
"IsManaged": true,
"Label": "Activities",
"LanguageCode": 1033,
"MetadataId": "4b9709b3-2241-db11-898a-0007e9e17ebd"
}
],
"UserLocalizedLabel": {
"HasChanged": null,
"IsManaged": true,
"Label": "Activities",
"LanguageCode": 1033,
"MetadataId": "4b9709b3-2241-db11-898a-0007e9e17ebd"
}
},
"DisplayName": {
"LocalizedLabels": [
{
"HasChanged": null,
"IsManaged": true,
"Label": "Activity",
"LanguageCode": 1033,
"MetadataId": "4a9709b3-2241-db11-898a-0007e9e17ebd"
}
],
"UserLocalizedLabel": {
"HasChanged": null,
"IsManaged": true,
"Label": "Activity",
"LanguageCode": 1033,
"MetadataId": "4a9709b3-2241-db11-898a-0007e9e17ebd"
}
},
"EnforceStateTransitions": false,
"EntityColor": "#505050",
"EntityHelpUrl": null,
"EntityHelpUrlEnabled": false,
"EntitySetName": "activitypointers",
"ExternalCollectionName": null,
"ExternalName": null,
"HasActivities": false,
"HasChanged": null,
"HasFeedback": false,
"HasNotes": false,
"IconLargeName": null,
"IconMediumName": null,
"IconSmallName": null,
"IconVectorName": null,
"IntroducedVersion": "5.0.0.0",
"IsAIRUpdated": false,
"IsActivity": false,
"IsActivityParty": false,
"IsAuditEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyauditsettings",
"Value": false
},
"IsAvailableOffline": true,
"IsBPFEntity": false,
"IsBusinessProcessEnabled": false,
"IsChildEntity": false,
"IsConnectionsEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyconnectionsettings",
"Value": true
},
"IsCustomEntity": false,
"IsCustomizable": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "iscustomizable",
"Value": true
},
"IsDocumentManagementEnabled": false,
"IsDocumentRecommendationsEnabled": false,
"IsDuplicateDetectionEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyduplicatedetectionsettings",
"Value": false
},
"IsEnabledForCharts": true,
"IsEnabledForExternalChannels": false,
"IsEnabledForTrace": false,
"IsImportable": false,
"IsInteractionCentricEnabled": true,
"IsIntersect": false,
"IsKnowledgeManagementEnabled": false,
"IsLogicalEntity": false,
"IsMSTeamsIntegrationEnabled": false,
"IsMailMergeEnabled": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymailmergesettings",
"Value": false
},
"IsManaged": true,
"IsMappable": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "ismappable",
"Value": false
},
"IsOfflineInMobileClient": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobileclientoffline",
"Value": false
},
"IsOneNoteIntegrationEnabled": false,
"IsOptimisticConcurrencyEnabled": true,
"IsPrivate": false,
"IsQuickCreateEnabled": false,
"IsReadOnlyInMobileClient": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobileclientreadonly",
"Value": false
},
"IsReadingPaneEnabled": true,
"IsRenameable": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "isrenameable",
"Value": true
},
"IsSLAEnabled": false,
"IsSolutionAware": false,
"IsStateModelAware": false,
"IsValidForAdvancedFind": true,
"IsValidForQueue": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifyqueuesettings",
"Value": false
},
"IsVisibleInMobile": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobilevisibility",
"Value": false
},
"IsVisibleInMobileClient": {
"CanBeChanged": false,
"ManagedPropertyLogicalName": "canmodifymobileclientvisibility",
"Value": true
},
"LogicalCollectionName": "activitypointers",
"LogicalName": "activitypointer",
"MetadataId": "c821cd41-f315-43d1-8fa6-82787b6f06e7",
"MobileOfflineFilters": "",
"ObjectTypeCode": 4200,
"OwnershipType": "UserOwned",
"PrimaryIdAttribute": "activityid",
"PrimaryImageAttribute": null,
"PrimaryNameAttribute": "subject",
"Privileges": [
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvCreateActivity",
"PrivilegeId": "091df793-fe5e-44d4-b4ca-7e3f580c4664",
"PrivilegeType": "Create"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvReadActivity",
"PrivilegeId": "650c14fe-3521-45fe-a000-84138688e45d",
"PrivilegeType": "Read"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvWriteActivity",
"PrivilegeId": "0dc8f72c-57d5-4b4d-8892-fe6aac0e4b81",
"PrivilegeType": "Write"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvDeleteActivity",
"PrivilegeId": "bb4457f2-9b45-4482-a95a-7adef25f388a",
"PrivilegeType": "Delete"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvAssignActivity",
"PrivilegeId": "8b99344e-ebbf-4f84-8438-e1e34d194de9",
"PrivilegeType": "Assign"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvShareActivity",
"PrivilegeId": "b5f2ee06-d359-4495-bbda-312aae1c6b1e",
"PrivilegeType": "Share"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvAppendActivity",
"PrivilegeId": "78777c10-09ab-4326-b4c8-cf5729702937",
"PrivilegeType": "Append"
},
{
"CanBeBasic": true,
"CanBeDeep": true,
"CanBeEntityReference": false,
"CanBeGlobal": true,
"CanBeLocal": true,
"CanBeParentEntityReference": false,
"Name": "prvAppendToActivity",
"PrivilegeId": "6ec8e901-d770-44c0-8f12-d07425f638bd",
"PrivilegeType": "AppendTo"
}
],
"RecurrenceBaseEntityLogicalName": null,
"ReportViewName": "FilteredActivityPointer",
"SchemaName": "ActivityPointer",
"SyncToExternalSearchIndex": false,
"UsesBusinessDataLabelTable": false
}
I reviewed this and I agree that there is no explicit entity metadata attribute akin to IsCreatable.
You could wrap an attempt to Create an empty entity of the type in a try / catch block.
When I ran:
var pointer = new ActivityPointer();
pointer.Create(svc);
The service threw this exception, even though the pointer entity contains no attributes:
System.ServiceModel.FaultException`1: 'The 'Create' method does not
support entities of type 'activitypointer'.'
This article lists the entities that support the IOrganizationService Create method under "Supported Entities".
Here is the list:
Account
ActivityMimeAttachment
Annotation
AnnualFiscalCalendar
Appointment
AsyncOperation
AttributeMap
BusinessUnit
BusinessUnitNewsArticle
Calendar
Campaign
CampaignActivity
CampaignResponse
ColumnMapping
Competitor
Connection
ConnectionRole
ConnectionRoleObjectTypeCode
ConstraintBasedGroup
Contact
Contract
ContractDetail
ContractTemplate
ConvertRule
ConvertRuleItem
CustomerAddress
CustomerOpportunityRole
CustomerRelationship
Discount
DiscountType
DuplicateRule
DuplicateRuleCondition
DynamicProperty
DynamicPropertyAssociation
DynamicPropertyInstance
DynamicPropertyOptionSetItem
Email
EmailServerProfile
Entitlement
EntitlementChannel
EntitlementTemplate
EntitlementTemplateChannel
Equipment
ExchangeSyncIdMapping
Fax
FieldPermission
FieldSecurityProfile
FixedMonthlyFiscalCalendar
Goal
GoalRollupQuery
HierarchyRule
HierarchySecurityConfiguration
Import
ImportEntityMapping
ImportFile
ImportJob
ImportMap
Incident
IncidentResolution
Invoice
InvoiceDetail
IsvConfig
KbArticle
KbArticleComment
KbArticleTemplate
Lead
Letter
List
LookUpMapping
Mailbox
MailMergeTemplate
Metric
MonthlyFiscalCalendar
msdyn_PostAlbum
msdyn_PostConfig
msdyn_PostRuleConfig
msdyn_wallsavedquery
msdyn_wallsavedqueryusersettings
Opportunity
OpportunityClose
OpportunityProduct
OrderClose
OrganizationUI
OwnerMapping
PhoneCall
PickListMapping
PluginAssembly
PluginType
Position
Post
PostComment
PostFollow
PostLike
PriceLevel
PrincipalObjectAttributeAccess
ProcessSession
ProcessTrigger
Product
ProductAssociation
ProductPriceLevel
ProductSubstitute
Publisher
PublisherAddress
QuarterlyFiscalCalendar
Queue
QueueItem
Quote
QuoteClose
QuoteDetail
RecurrenceRule
RecurringAppointmentMaster
RelationshipRole
RelationshipRoleMap
Report
ReportCategory
ReportEntity
ReportVisibility
ResourceSpec
Role
RollupField
RoutingRule
RoutingRuleItem
SalesLiterature
SalesLiteratureItem
SalesOrder
SalesOrderDetail
SavedQuery
SavedQueryVisualization
SdkMessageProcessingStep
SdkMessageProcessingStepImage
SdkMessageProcessingStepSecureConfig
SemiAnnualFiscalCalendar
Service
ServiceAppointment
ServiceEndpoint
SharePointDocument
SharePointDocumentLocation
SharePointSite
Site
SLA
SLAItem
SLAKPIInstance
SocialActivity
SocialInsightsConfiguration
SocialProfile
Solution
Subject
SystemForm
SystemUser
Task
Team
TeamTemplate
Template
Territory
TraceLog
TransactionCurrency
TransformationMapping
TransformationParameterMapping
UoM
UoMSchedule
UserEntityInstanceData
UserEntityUISettings
UserForm
UserQuery
UserQueryVisualization
WebResource
Workflow
WorkflowDependency
WorkflowLog

Browsersync LiveReload on Proxy Server

I am new to browser-sync and I can't seem to figure out how to get live reload to work on a proxy server. In my current setup I don't have access to the files on my local machine so I have to use a proxy. I currently have a config file and here is the current setup.
module.exports = {
"ui": {
"port": 3001,
"weinre": {
"port": 8080
}
},
"files": ['Styles/bootstrap-custom-addons.css', '/Styles/*.css'],
"watchOptions": {},
"server": false,
"proxy": {
target: "http://example.com",
files: ['Styles/bootstrap-custom-addons.css', '/Styles/*.css'],
},
"port": 3000,
"middleware": false,
"ghostMode": {
"clicks": true,
"scroll": true,
"forms": {
"submit": true,
"inputs": true,
"toggles": true
}
},
"logLevel": "info",
"logPrefix": "BS",
"logConnections": false,
"logFileChanges": true,
"logSnippet": true,
"rewriteRules": false,
"open": "local",
"browser": "default",
"xip": false,
"hostnameSuffix": false,
"reloadOnRestart": true,
"notify": true,
"scrollProportionally": true,
"scrollThrottle": 0,
"reloadDelay": 0,
"reloadDebounce": 0,
"plugins": [],
"injectChanges": true,
"startPath": null,
"minify": true,
"host": null,
"codeSync": true,
"timestamps": true,
"clientEvents": [
"scroll",
"input:text",
"input:toggles",
"form:submit",
"form:reset",
"click"
],
"socket": {
"path": "/browser-sync/socket.io",
"clientPath": "/browser-sync",
"namespace": "/browser-sync",
"clients": {
"heartbeatTimeout": 5000
}
},
"tagNames": {
"less": "link",
"scss": "link",
"css": "link",
"jpg": "img",
"jpeg": "img",
"png": "img",
"svg": "img",
"gif": "img",
"js": "script"
}
};
Page Scroll and clicks work across browsers, but when I update a file on the server it does not automatically reload the page, am I not setting up the config file correctly? Also what is the difference between running browser-sync start --config bs-config.js and just running brower-sync start --proxy "http://www.example.com"?

jqgrid not work on IE8

my below code not worked on IE 8.
Its a JQGrid (treegrid) to display treegrid format from json server. it worked at firefox.
$(function () {
"use strict";
$("#tree").jqGrid({
url: "http://myJSON-URL/",
datatype: "json",
colNames: ['id', 'Prestations'],
colModel: [
{ name: 'id', width: 100, key: true, hidden: true },
{ name: 'name', width: 785, sortable: false }
],
sortname: 'id',
sortorder: "asc",
hiddengrid: true,
gridview: true,
treeGrid: true,
treeGridModel: "adjacency",
ExpandColumn: 'name',
ExpandColClick: true,
jsonReader: { repeatitems: false, root: function (obj) { return obj; } },
height: "auto"
});
});
I think its AJAX cors problem.
Any idea? thanx.
The json server side responsed these:
json = [
{
"id": "1",
"name": "ECHANGEUR",
"level": "0",
"parent": "null",
"isLeaf": false,
"expanded": false,
"loaded": true
},
{
"id": "1_1",
"name": "Intervention Aller sur Site",
"level": "1",
"parent": "1",
"isLeaf": false,
"expanded": false,
"loaded": true
},
{
"id": "1_1_1",
"name": "Date et heure d'arrivée sur le site",
"level": "2",
"parent": "1_1",
"isLeaf": true,
"expanded": true,
"loaded": true
},
{
"id": "1_1_2",
"name": "Consignation de l'échangeur",
"level": "2",
"parent": "1_1",
"isLeaf": true,
"expanded": true,
"loaded": true
}
];
You have just the problem with the bug specific for jqGrid 4.7.x. You can try tree demos which uses different versions of jqGrid and the same code and JSON which you posted:
demo46, demo47, demo48, demo-free-jqGrid-GitHub.
(The last one uses free jqGrid 4.8 which I published recently, see here and here).
You can verify that the demo which uses jqGrid 4.7 only have the problem in IE8 and both other demos have no problem. You can read more about the bug here or here.

jqGrid is empty with JSON call

My jqGrid is coming empty with JSON call. Though it is working with datatype='jsonstring' but not with json type. here is my JSON
{
"d": {
"total": 6,
"page": 1,
"records": 6,
"rows": [
{
"id": 1,
"Name": "James",
"EMPID": "0000000056",
"EMPDATE": "",
"JOBTYPE": "REQ",
"DEPTID": "FIN",
"STATUS": "P1"
},
{
"id": 2,
"Name": "James",
"EMPID": "R2",
"EMPDATE": "",
"JOBTYPE": "REQ",
"DEPTID": "FIN",
"STATUS": "P1"
},
{
"id": 3,
"Name": "James",
"EMPID": "V2",
"EMPDATE": "",
"JOBTYPE": "VOU",
"DEPTID": "FIN",
"STATUS": ""
},
{
"id": 4,
"Name": "James",
"EMPID": "V1",
"EMPDATE": "",
"JOBTYPE": "VOU",
"DEPTID": "FIN",
"STATUS": ""
},
{
"id": 5,
"Name": "James",
"EMPID": "009017",
"EMPDATE": "",
"JOBTYPE": "PY",
"DEPTID": "",
"STATUS": "V2"
},
{
"id": 6,
"Name": "James",
"EMPID": "009018",
"EMPDATE": "",
"JOBTYPE": "PY",
"DEPTID": "",
"STATUS": "V1"
}
]
}
}
and my jqGrid call from javascript is
function getgrid()
{
$("#list").jqGrid({
url:'http://10.240.26.41/GetGridFields',
datatype: 'json',
mtype: 'GET',
ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
//serializeGridData: function (postData) {
// return JSON.stringify(postData);
// },
jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", total: "d.total", records: "d.records" },
colModel: [
{ name: 'id', key: true, width: 60, align: "center", hidden: false },
{ name: 'Name', width: 80, sortable: false, hidden: false },
{ name: 'EMPID', width: 180, sortable: false, hidden: false },
{ name: 'EMPDATE', width: 180, sortable: false, hidden: false },
{ name: 'JOBTYPE', width: 180, sortable: false, hidden: false },
{ name: 'DEPTID', width: 180, sortable: false, hidden: false },
{ name: 'STATUS', width: 180, sortable: false, hidden: false }
],
rowNum: 10,
rowList: [10, 20, 300],
pager: "#pager",
viewrecords: true,
gridview: true,
rownumbers: true,
height: 230,
caption: 'Emp Detail'
})
}
Please let me know where i am wrong here. It is working fine with jsonstring.
How you can see on the demo your jqGrid can read your JSON data. I made in the demo only minimal optimization changes which don't important for your main problem.
So I suppose, that you have either the problem with the usage of full URL (you should use '/GetGridFields' instead of 'http://10.240.26.41/GetGridFields') because you can't get Ajax call to another IP host because of the same origin policy. One other possible reason is that you have wrong 'Content-Type' or some other HTTP header. You can examine the HTTP headers with respect of Fiddler, Firebug or just with Developer Tools of IE or Chrome (see "Network" tab).
In any way I would recommend you to include loadError handler to jqGrid. See the answer for details.
I suggest you validate your json result using jslint since using jsonstring is working could be a format type problem

Resources