JSON Function return value but not display in JqGrid mvc c#
I want to display data in jqgrid, JSON response I have shared with you guy in d var JSON response show but not display in jqgrid. any expert can tell me what is the problem in my code and How can I resolved this issue.
i have shared Whole code you can see below.
There are two table in json response mybe this issue if this then How can i show two table value in json grid
"billing_address": {
json response
[
{
"id": 100,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:05:15 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:50 +0000",
"date_shipped": "Wed, 07 Nov 2018 08:07:50 +0000",
"status_id": 2,
"status": "Shipped",
"subtotal_ex_tax": "1500.0000",
"subtotal_inc_tax": "1500.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1695.0000",
"total_inc_tax": "1695.0000",
"total_tax": "0.0000",
"items_total": 2,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "c518fe2a-0513-41d5-9c32-261774e0d464",
"billing_address": {
"first_name": "Test",
"last_name": "Order",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/products",
"resource": "/orders/100/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/shippingaddresses",
"resource": "/orders/100/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/coupons",
"resource": "/orders/100/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Shipped"
},
{
"id": 101,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:06:36 +0000",
"date_modified": "Wed, 07 Nov 2018 08:06:43 +0000",
"date_shipped": "",
"status_id": 11,
"status": "Awaiting Fulfillment",
"subtotal_ex_tax": "1200.0000",
"subtotal_inc_tax": "1200.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1395.0000",
"total_inc_tax": "1395.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a8601588-856f-4512-acc6-166888bf5fa3",
"billing_address": {
"first_name": "Customer",
"last_name": "Two",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/products",
"resource": "/orders/101/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/shippingaddresses",
"resource": "/orders/101/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/coupons",
"resource": "/orders/101/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Fulfillment"
},
{
"id": 102,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "3750.0000",
"subtotal_inc_tax": "3750.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "3750.0000",
"total_inc_tax": "3750.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a67115de-e712-42de-bcbd-4054c3036b12",
"billing_address": {
"first_name": "Customer",
"last_name": "Three",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "b@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/products",
"resource": "/orders/102/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/shippingaddresses",
"resource": "/orders/102/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/coupons",
"resource": "/orders/102/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
},
{
"id": 103,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:13:02 +0000",
"date_modified": "Wed, 07 Nov 2018 08:13:13 +0000",
"date_shipped": "",
"status_id": 6,
"status": "Declined",
"subtotal_ex_tax": "1440.0000",
"subtotal_inc_tax": "1440.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1635.0000",
"total_inc_tax": "1635.0000",
"total_tax": "0.0000",
"items_total": 8,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "9b01c68a-cb1d-4198-b1e1-fbb87080db25",
"billing_address": {
"first_name": "Customer",
"last_name": "Four",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "c@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/products",
"resource": "/orders/103/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/shippingaddresses",
"resource": "/orders/103/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/coupons",
"resource": "/orders/103/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Declined"
},
{
"id": 104,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:24:55 +0000",
"date_modified": "Wed, 07 Nov 2018 08:31:17 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "900.0000",
"subtotal_inc_tax": "900.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "900.0000",
"total_inc_tax": "900.0000",
"total_tax": "0.0000",
"items_total": 4,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "d8ac51bc-d751-4fdf-8a27-c549d69ae600",
"billing_address": {
"first_name": "Customer",
"last_name": "One",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "d@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/products",
"resource": "/orders/104/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/shippingaddresses",
"resource": "/orders/104/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/coupons",
"resource": "/orders/104/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
}
]
json function
public async Task<ActionResult> mGetorder()
{
string apiUrl = "https://api.bigcommerce.com/stores/{code}/v2/orders.json";
var d = "";
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri(apiUrl);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Add("x-auth-token", "ID");
client.DefaultRequestHeaders.Add("X-Auth-Client", "ID");
HttpResponseMessage response = await client.GetAsync(apiUrl);
if (response.IsSuccessStatusCode)
{
var data = await response.Content.ReadAsStringAsync();
DataSet ds = new DataSet(data);
string JSONString = JsonConvert.SerializeObject(data);
JavaScriptSerializer jss = new JavaScriptSerializer();
d = jss.Deserialize<dynamic>(JSONString);
}
}
return Json(d, JsonRequestBehavior.AllowGet);
}
Javascript
<script type="text/javascript">
jQuery(document).ready(function ($) {
var $grid = $("#JqGrid");
$grid.jqGrid({
url: '@Url.Action("mGetorder")',
datatype: 'json',
colNames: ['id', 'date_created', 'date_modified', 'date_shipped', 'status'],
colModel: [
{ name: 'id', index: 'id', width: 10 },
{ name: 'date_created', index: 'date_created', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_modified', index: 'date_modified', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_shipped', index: 'date_shipped', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'status', index: 'status', width: 50 },
],
caption: "Order list",
pager: "#JqGridPager",
viewrecords: true,
width: 1100,
height: 400
});
$grid.jqGrid('navGrid', '#JqGridPager', { edit: false, add: false, del: false })
});
</script>
javascript c# jquery json jqgrid
add a comment |
I want to display data in jqgrid, JSON response I have shared with you guy in d var JSON response show but not display in jqgrid. any expert can tell me what is the problem in my code and How can I resolved this issue.
i have shared Whole code you can see below.
There are two table in json response mybe this issue if this then How can i show two table value in json grid
"billing_address": {
json response
[
{
"id": 100,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:05:15 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:50 +0000",
"date_shipped": "Wed, 07 Nov 2018 08:07:50 +0000",
"status_id": 2,
"status": "Shipped",
"subtotal_ex_tax": "1500.0000",
"subtotal_inc_tax": "1500.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1695.0000",
"total_inc_tax": "1695.0000",
"total_tax": "0.0000",
"items_total": 2,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "c518fe2a-0513-41d5-9c32-261774e0d464",
"billing_address": {
"first_name": "Test",
"last_name": "Order",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/products",
"resource": "/orders/100/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/shippingaddresses",
"resource": "/orders/100/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/coupons",
"resource": "/orders/100/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Shipped"
},
{
"id": 101,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:06:36 +0000",
"date_modified": "Wed, 07 Nov 2018 08:06:43 +0000",
"date_shipped": "",
"status_id": 11,
"status": "Awaiting Fulfillment",
"subtotal_ex_tax": "1200.0000",
"subtotal_inc_tax": "1200.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1395.0000",
"total_inc_tax": "1395.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a8601588-856f-4512-acc6-166888bf5fa3",
"billing_address": {
"first_name": "Customer",
"last_name": "Two",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/products",
"resource": "/orders/101/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/shippingaddresses",
"resource": "/orders/101/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/coupons",
"resource": "/orders/101/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Fulfillment"
},
{
"id": 102,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "3750.0000",
"subtotal_inc_tax": "3750.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "3750.0000",
"total_inc_tax": "3750.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a67115de-e712-42de-bcbd-4054c3036b12",
"billing_address": {
"first_name": "Customer",
"last_name": "Three",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "b@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/products",
"resource": "/orders/102/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/shippingaddresses",
"resource": "/orders/102/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/coupons",
"resource": "/orders/102/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
},
{
"id": 103,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:13:02 +0000",
"date_modified": "Wed, 07 Nov 2018 08:13:13 +0000",
"date_shipped": "",
"status_id": 6,
"status": "Declined",
"subtotal_ex_tax": "1440.0000",
"subtotal_inc_tax": "1440.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1635.0000",
"total_inc_tax": "1635.0000",
"total_tax": "0.0000",
"items_total": 8,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "9b01c68a-cb1d-4198-b1e1-fbb87080db25",
"billing_address": {
"first_name": "Customer",
"last_name": "Four",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "c@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/products",
"resource": "/orders/103/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/shippingaddresses",
"resource": "/orders/103/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/coupons",
"resource": "/orders/103/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Declined"
},
{
"id": 104,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:24:55 +0000",
"date_modified": "Wed, 07 Nov 2018 08:31:17 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "900.0000",
"subtotal_inc_tax": "900.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "900.0000",
"total_inc_tax": "900.0000",
"total_tax": "0.0000",
"items_total": 4,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "d8ac51bc-d751-4fdf-8a27-c549d69ae600",
"billing_address": {
"first_name": "Customer",
"last_name": "One",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "d@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/products",
"resource": "/orders/104/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/shippingaddresses",
"resource": "/orders/104/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/coupons",
"resource": "/orders/104/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
}
]
json function
public async Task<ActionResult> mGetorder()
{
string apiUrl = "https://api.bigcommerce.com/stores/{code}/v2/orders.json";
var d = "";
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri(apiUrl);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Add("x-auth-token", "ID");
client.DefaultRequestHeaders.Add("X-Auth-Client", "ID");
HttpResponseMessage response = await client.GetAsync(apiUrl);
if (response.IsSuccessStatusCode)
{
var data = await response.Content.ReadAsStringAsync();
DataSet ds = new DataSet(data);
string JSONString = JsonConvert.SerializeObject(data);
JavaScriptSerializer jss = new JavaScriptSerializer();
d = jss.Deserialize<dynamic>(JSONString);
}
}
return Json(d, JsonRequestBehavior.AllowGet);
}
Javascript
<script type="text/javascript">
jQuery(document).ready(function ($) {
var $grid = $("#JqGrid");
$grid.jqGrid({
url: '@Url.Action("mGetorder")',
datatype: 'json',
colNames: ['id', 'date_created', 'date_modified', 'date_shipped', 'status'],
colModel: [
{ name: 'id', index: 'id', width: 10 },
{ name: 'date_created', index: 'date_created', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_modified', index: 'date_modified', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_shipped', index: 'date_shipped', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'status', index: 'status', width: 50 },
],
caption: "Order list",
pager: "#JqGridPager",
viewrecords: true,
width: 1100,
height: 400
});
$grid.jqGrid('navGrid', '#JqGridPager', { edit: false, add: false, del: false })
});
</script>
javascript c# jquery json jqgrid
add a comment |
I want to display data in jqgrid, JSON response I have shared with you guy in d var JSON response show but not display in jqgrid. any expert can tell me what is the problem in my code and How can I resolved this issue.
i have shared Whole code you can see below.
There are two table in json response mybe this issue if this then How can i show two table value in json grid
"billing_address": {
json response
[
{
"id": 100,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:05:15 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:50 +0000",
"date_shipped": "Wed, 07 Nov 2018 08:07:50 +0000",
"status_id": 2,
"status": "Shipped",
"subtotal_ex_tax": "1500.0000",
"subtotal_inc_tax": "1500.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1695.0000",
"total_inc_tax": "1695.0000",
"total_tax": "0.0000",
"items_total": 2,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "c518fe2a-0513-41d5-9c32-261774e0d464",
"billing_address": {
"first_name": "Test",
"last_name": "Order",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/products",
"resource": "/orders/100/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/shippingaddresses",
"resource": "/orders/100/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/coupons",
"resource": "/orders/100/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Shipped"
},
{
"id": 101,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:06:36 +0000",
"date_modified": "Wed, 07 Nov 2018 08:06:43 +0000",
"date_shipped": "",
"status_id": 11,
"status": "Awaiting Fulfillment",
"subtotal_ex_tax": "1200.0000",
"subtotal_inc_tax": "1200.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1395.0000",
"total_inc_tax": "1395.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a8601588-856f-4512-acc6-166888bf5fa3",
"billing_address": {
"first_name": "Customer",
"last_name": "Two",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/products",
"resource": "/orders/101/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/shippingaddresses",
"resource": "/orders/101/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/coupons",
"resource": "/orders/101/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Fulfillment"
},
{
"id": 102,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "3750.0000",
"subtotal_inc_tax": "3750.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "3750.0000",
"total_inc_tax": "3750.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a67115de-e712-42de-bcbd-4054c3036b12",
"billing_address": {
"first_name": "Customer",
"last_name": "Three",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "b@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/products",
"resource": "/orders/102/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/shippingaddresses",
"resource": "/orders/102/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/coupons",
"resource": "/orders/102/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
},
{
"id": 103,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:13:02 +0000",
"date_modified": "Wed, 07 Nov 2018 08:13:13 +0000",
"date_shipped": "",
"status_id": 6,
"status": "Declined",
"subtotal_ex_tax": "1440.0000",
"subtotal_inc_tax": "1440.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1635.0000",
"total_inc_tax": "1635.0000",
"total_tax": "0.0000",
"items_total": 8,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "9b01c68a-cb1d-4198-b1e1-fbb87080db25",
"billing_address": {
"first_name": "Customer",
"last_name": "Four",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "c@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/products",
"resource": "/orders/103/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/shippingaddresses",
"resource": "/orders/103/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/coupons",
"resource": "/orders/103/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Declined"
},
{
"id": 104,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:24:55 +0000",
"date_modified": "Wed, 07 Nov 2018 08:31:17 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "900.0000",
"subtotal_inc_tax": "900.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "900.0000",
"total_inc_tax": "900.0000",
"total_tax": "0.0000",
"items_total": 4,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "d8ac51bc-d751-4fdf-8a27-c549d69ae600",
"billing_address": {
"first_name": "Customer",
"last_name": "One",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "d@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/products",
"resource": "/orders/104/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/shippingaddresses",
"resource": "/orders/104/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/coupons",
"resource": "/orders/104/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
}
]
json function
public async Task<ActionResult> mGetorder()
{
string apiUrl = "https://api.bigcommerce.com/stores/{code}/v2/orders.json";
var d = "";
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri(apiUrl);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Add("x-auth-token", "ID");
client.DefaultRequestHeaders.Add("X-Auth-Client", "ID");
HttpResponseMessage response = await client.GetAsync(apiUrl);
if (response.IsSuccessStatusCode)
{
var data = await response.Content.ReadAsStringAsync();
DataSet ds = new DataSet(data);
string JSONString = JsonConvert.SerializeObject(data);
JavaScriptSerializer jss = new JavaScriptSerializer();
d = jss.Deserialize<dynamic>(JSONString);
}
}
return Json(d, JsonRequestBehavior.AllowGet);
}
Javascript
<script type="text/javascript">
jQuery(document).ready(function ($) {
var $grid = $("#JqGrid");
$grid.jqGrid({
url: '@Url.Action("mGetorder")',
datatype: 'json',
colNames: ['id', 'date_created', 'date_modified', 'date_shipped', 'status'],
colModel: [
{ name: 'id', index: 'id', width: 10 },
{ name: 'date_created', index: 'date_created', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_modified', index: 'date_modified', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_shipped', index: 'date_shipped', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'status', index: 'status', width: 50 },
],
caption: "Order list",
pager: "#JqGridPager",
viewrecords: true,
width: 1100,
height: 400
});
$grid.jqGrid('navGrid', '#JqGridPager', { edit: false, add: false, del: false })
});
</script>
javascript c# jquery json jqgrid
I want to display data in jqgrid, JSON response I have shared with you guy in d var JSON response show but not display in jqgrid. any expert can tell me what is the problem in my code and How can I resolved this issue.
i have shared Whole code you can see below.
There are two table in json response mybe this issue if this then How can i show two table value in json grid
"billing_address": {
json response
[
{
"id": 100,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:05:15 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:50 +0000",
"date_shipped": "Wed, 07 Nov 2018 08:07:50 +0000",
"status_id": 2,
"status": "Shipped",
"subtotal_ex_tax": "1500.0000",
"subtotal_inc_tax": "1500.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1695.0000",
"total_inc_tax": "1695.0000",
"total_tax": "0.0000",
"items_total": 2,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "c518fe2a-0513-41d5-9c32-261774e0d464",
"billing_address": {
"first_name": "Test",
"last_name": "Order",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/products",
"resource": "/orders/100/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/shippingaddresses",
"resource": "/orders/100/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/100/coupons",
"resource": "/orders/100/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Shipped"
},
{
"id": 101,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:06:36 +0000",
"date_modified": "Wed, 07 Nov 2018 08:06:43 +0000",
"date_shipped": "",
"status_id": 11,
"status": "Awaiting Fulfillment",
"subtotal_ex_tax": "1200.0000",
"subtotal_inc_tax": "1200.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1395.0000",
"total_inc_tax": "1395.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a8601588-856f-4512-acc6-166888bf5fa3",
"billing_address": {
"first_name": "Customer",
"last_name": "Two",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "a@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/products",
"resource": "/orders/101/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/shippingaddresses",
"resource": "/orders/101/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/101/coupons",
"resource": "/orders/101/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Fulfillment"
},
{
"id": 102,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_modified": "Wed, 07 Nov 2018 08:07:34 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "3750.0000",
"subtotal_inc_tax": "3750.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "3750.0000",
"total_inc_tax": "3750.0000",
"total_tax": "0.0000",
"items_total": 5,
"items_shipped": 0,
"payment_method": "Bank Deposit",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "a67115de-e712-42de-bcbd-4054c3036b12",
"billing_address": {
"first_name": "Customer",
"last_name": "Three",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "b@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/products",
"resource": "/orders/102/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/shippingaddresses",
"resource": "/orders/102/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/102/coupons",
"resource": "/orders/102/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
},
{
"id": 103,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:13:02 +0000",
"date_modified": "Wed, 07 Nov 2018 08:13:13 +0000",
"date_shipped": "",
"status_id": 6,
"status": "Declined",
"subtotal_ex_tax": "1440.0000",
"subtotal_inc_tax": "1440.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "195.0000",
"shipping_cost_ex_tax": "195.0000",
"shipping_cost_inc_tax": "195.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "1635.0000",
"total_inc_tax": "1635.0000",
"total_tax": "0.0000",
"items_total": 8,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "9b01c68a-cb1d-4198-b1e1-fbb87080db25",
"billing_address": {
"first_name": "Customer",
"last_name": "Four",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "c@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/products",
"resource": "/orders/103/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/shippingaddresses",
"resource": "/orders/103/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/103/coupons",
"resource": "/orders/103/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Declined"
},
{
"id": 104,
"customer_id": 0,
"date_created": "Wed, 07 Nov 2018 08:24:55 +0000",
"date_modified": "Wed, 07 Nov 2018 08:31:17 +0000",
"date_shipped": "",
"status_id": 7,
"status": "Awaiting Payment",
"subtotal_ex_tax": "900.0000",
"subtotal_inc_tax": "900.0000",
"subtotal_tax": "0.0000",
"base_shipping_cost": "0.0000",
"shipping_cost_ex_tax": "0.0000",
"shipping_cost_inc_tax": "0.0000",
"shipping_cost_tax": "0.0000",
"shipping_cost_tax_class_id": 2,
"base_handling_cost": "0.0000",
"handling_cost_ex_tax": "0.0000",
"handling_cost_inc_tax": "0.0000",
"handling_cost_tax": "0.0000",
"handling_cost_tax_class_id": 2,
"base_wrapping_cost": "0.0000",
"wrapping_cost_ex_tax": "0.0000",
"wrapping_cost_inc_tax": "0.0000",
"wrapping_cost_tax": "0.0000",
"wrapping_cost_tax_class_id": 3,
"total_ex_tax": "900.0000",
"total_inc_tax": "900.0000",
"total_tax": "0.0000",
"items_total": 4,
"items_shipped": 0,
"payment_method": "Cash on Delivery",
"payment_provider_id": null,
"payment_status": "",
"refunded_amount": "0.0000",
"order_is_digital": false,
"store_credit_amount": "0.0000",
"gift_certificate_amount": "0.0000",
"ip_address": "202.163.79.146",
"geoip_country": "Pakistan",
"geoip_country_iso2": "PK",
"currency_id": 1,
"currency_code": "PKR",
"currency_exchange_rate": "1.0000000000",
"default_currency_id": 1,
"default_currency_code": "PKR",
"staff_notes": "",
"customer_message": "",
"discount_amount": "0.0000",
"coupon_discount": "0.0000",
"shipping_address_count": 1,
"is_deleted": false,
"ebay_order_id": "0",
"cart_id": "d8ac51bc-d751-4fdf-8a27-c549d69ae600",
"billing_address": {
"first_name": "Customer",
"last_name": "One",
"company": "",
"street_1": "112/2 E Block Model Town",
"street_2": "",
"city": "Lahore",
"state": "",
"zip": "54700",
"country": "Pakistan",
"country_iso2": "PK",
"phone": "3444646553",
"email": "d@a.com",
"form_fields":
},
"is_email_opt_in": false,
"credit_card_type": null,
"order_source": "manual",
"channel_id": 1,
"external_source": null,
"products": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/products",
"resource": "/orders/104/products"
},
"shipping_addresses": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/shippingaddresses",
"resource": "/orders/104/shippingaddresses"
},
"coupons": {
"url": "https://api.bigcommerce.com/stores/4jwabif3gj/v2/orders/104/coupons",
"resource": "/orders/104/coupons"
},
"external_id": null,
"external_merchant_id": null,
"tax_provider_id": "BasicTaxProvider",
"custom_status": "Awaiting Payment"
}
]
json function
public async Task<ActionResult> mGetorder()
{
string apiUrl = "https://api.bigcommerce.com/stores/{code}/v2/orders.json";
var d = "";
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri(apiUrl);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.Add("x-auth-token", "ID");
client.DefaultRequestHeaders.Add("X-Auth-Client", "ID");
HttpResponseMessage response = await client.GetAsync(apiUrl);
if (response.IsSuccessStatusCode)
{
var data = await response.Content.ReadAsStringAsync();
DataSet ds = new DataSet(data);
string JSONString = JsonConvert.SerializeObject(data);
JavaScriptSerializer jss = new JavaScriptSerializer();
d = jss.Deserialize<dynamic>(JSONString);
}
}
return Json(d, JsonRequestBehavior.AllowGet);
}
Javascript
<script type="text/javascript">
jQuery(document).ready(function ($) {
var $grid = $("#JqGrid");
$grid.jqGrid({
url: '@Url.Action("mGetorder")',
datatype: 'json',
colNames: ['id', 'date_created', 'date_modified', 'date_shipped', 'status'],
colModel: [
{ name: 'id', index: 'id', width: 10 },
{ name: 'date_created', index: 'date_created', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_modified', index: 'date_modified', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'date_shipped', index: 'date_shipped', width: 50, sorttype: 'date', datefmt: 'Y-m-d' },
{ name: 'status', index: 'status', width: 50 },
],
caption: "Order list",
pager: "#JqGridPager",
viewrecords: true,
width: 1100,
height: 400
});
$grid.jqGrid('navGrid', '#JqGridPager', { edit: false, add: false, del: false })
});
</script>
javascript c# jquery json jqgrid
javascript c# jquery json jqgrid
edited Nov 15 '18 at 8:17
user2697533
asked Nov 15 '18 at 6:24
user2697533user2697533
2718
2718
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313583%2fjson-function-return-value-but-not-display-in-jqgrid-mvc-c-sharp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53313583%2fjson-function-return-value-but-not-display-in-jqgrid-mvc-c-sharp%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown