<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: jqGrid Subgrid error with Date field as KEY Parameter + asp.net mvc3</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-subgrid-error-with-date-field-as-key-parameter-asp-net-mvc3</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-subgrid-error-with-date-field-as-key-parameter-asp-net-mvc3/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on jqGrid Subgrid error with Date field as KEY Parameter + asp.net mvc3</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-subgrid-error-with-date-field-as-key-parameter-asp-net-mvc3#p30396</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-subgrid-error-with-date-field-as-key-parameter-asp-net-mvc3#p30396</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>You build a grid with date field. Data field has separator "/" as per your definition. This is not allowed for the ids.</p>
<p>Maybe you will need to remove the "/" before building the subgrid and pass a correct string as id.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 25 Mar 2014 12:35:44 +0200</pubDate>
        </item>
        <item>
        	<title>msbyuva on jqGrid Subgrid error with Date field as KEY Parameter + asp.net mvc3</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-subgrid-error-with-date-field-as-key-parameter-asp-net-mvc3#p30371</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-subgrid-error-with-date-field-as-key-parameter-asp-net-mvc3#p30371</guid>
        	        	<description><![CDATA[<p>I am using jQGrid with Subgrid feature, My Key column has Date, when I click on "+" subGridRowExpanded is fired and it creates a SubGrid</p>
<p>Code works fine when used other column which has Number as Key Field but it&#39;s throwing error when using Date as key field ex it will have the value 03/18/2014</p>
<p>"Microsoft JScript runtime error: Syntax error, unrecognized expression: #grid_3/18/2014" My main grid id is grid</p>
<p>It works fine when I use GMMNumber as Key but fails when I use NCChitDate which is a Date Field with value in Date Format..</p>
<p>Here is my code below :</p>
<blockquote>
<pre class="lang-cs prettyprint prettyprinted"><p><input type='button' class='sfcodeselect' name='sfselectit5420' value='Select Code' data-codeid='sfcode5420' /></p><div class='sfcode' id='sfcode5420'>function LoadNCTRequestGrid() {
    var cols = "";
    var colmodels = "";
    if (!ReqType) {
        cols = [&#39;Date&#39;, &#39;NC Chit Print&#39;, &#39;2nd Scan Disposition&#39;, &#39;%&#39;, "Items Merch&#39;d in Place", &#39;Items On Request&#39;, &#39;Carton Completed&#39;, &#39;%&#39;, &#39;Open Balance (Items On Request Carton Complete)&#39;];
        colmodels = [{ name: &#39;NCChitDate&#39;, index: &#39;NCChitDate&#39;, width: 300, key: true },
                   { name: &#39;NCChitPrintQty&#39;, index: &#39;NCChitPrintQty&#39;, width: 300 },
                   { name: &#39;SecondScanDisp&#39;, index: &#39;SecondScanDisp&#39;, width: 300 },
                   { name: &#39;PercentageSecondScanDisp&#39;, index: &#39;PercentageSecondScanDisp&#39;, width: 180 },
                   { name: &#39;ItemsMerchandised&#39;, index: &#39;ItemsMerchandised&#39;, width: 280 },
                   { name: &#39;ItemsOnRequest&#39;, index: &#39;ItemsOnRequest&#39;, width: 280 },
                   { name: &#39;CartonCompleted&#39;, index: &#39;CartonCompleted&#39;, width: 280 },
                   { name: &#39;PercentageCartonCompleted&#39;, index: &#39;PercentageCartonCompleted&#39;, width: 280 },
                   { name: &#39;OpenBalance&#39;, index: &#39;OpenBalance&#39;, width: 280 }
    ];
    }
    else{
        cols = [&#39;&#39;,&#39;GMM&#39;, &#39;NC Chit Print&#39;, &#39;2nd Scan Disposition&#39;, &#39;%&#39;, "Items Merch&#39;d in Place", &#39;Items On Request&#39;, &#39;Carton Completed&#39;, &#39;%&#39;, &#39;Open Balance (Items On Request Carton Complete)&#39;];
        colmodels = [
                   { name: &#39;GMMNumber&#39;, index: &#39;GMMNumber&#39;, width: 300, key:true, hidden:true},
                   { name: &#39;GMMDesc&#39;, index: &#39;GMMDesc&#39;, width: 300 },
                   { name: &#39;NCChitPrintQty&#39;, index: &#39;NCChitPrintQty&#39;, width: 300 },
                   { name: &#39;SecondScanDisp&#39;, index: &#39;SecondScanDisp&#39;, width: 300 },
                   { name: &#39;PercentageSecondScanDisp&#39;, index: &#39;PercentageSecondScanDisp&#39;, width: 180 },
                   { name: &#39;ItemsMerchandised&#39;, index: &#39;ItemsMerchandised&#39;, width: 280 },
                   { name: &#39;ItemsOnRequest&#39;, index: &#39;ItemsOnRequest&#39;, width: 280 },
                   { name: &#39;CartonCompleted&#39;, index: &#39;CartonCompleted&#39;, width: 280 },
                   { name: &#39;PercentageCartonCompleted&#39;, index: &#39;PercentageCartonCompleted&#39;, width: 280 },
                   { name: &#39;OpenBalance&#39;, index: &#39;OpenBalance&#39;, width: 280 }
    ];
    }
    $("#grid").jqGrid({
        url: &#39;@Url.Action("GetNCTRequest")&#39;,
        mtype: "POST",
        datatype: &#39;json&#39;,
        colNames: cols,
        colModel: colmodels,
        width: 1140,
        height: &#39;100%&#39;,
        rowNum: 5000,
        subGrid: true,
        afterInsertRow: function (rowId, aData, rowelem) {
            var theGrid = $(this);
        },
        beforeSelectRow: function (rowid, e) {
            return false;
        },
        loadComplete: function () {
            $("tr.jqgrow:odd").css("background", "#DDDDDC");
            $(".jqgrow:odd").hover(
                    function () {
                        $(this).css("background-color", "#E11A2B");
                    },
                     function (event) { $(this).css("background-color", "#DDDDDC"); }
                );
        },
        subGridRowExpanded: function (subgridDivId, rowId) {
            var subgridTableId = subgridDivId + &#39;_t&#39;;

            $("#" + subgridDivId).html("&#60;table id=&#39;" + subgridTableId + "&#39;&#62;&#60;/table&#62;");
              var cols = "";
              var colmodels = "";
              if(!ReqType){
              cols = [&#39;GMM&#39;, &#39;DIV&#39;, &#39;Dept&#39;, &#39;Vend&#39;, &#39;UPC&#39;, &#39;NC Chit Print&#39;, &#39;2nd Scan Disposition&#39;, "Items Merch&#39;d in Place", &#39;Items On Request&#39;, &#39;Carton Completed&#39;, &#39;Open Balance (Items On Request Carton Complete)&#39;, &#39;Carton ID&#39;];
              colmodels =   [
                   { name: &#39;GMMDesc&#39;, index: &#39;GMMDesc&#39;, width: 300 },
                   { name: &#39;DivisionDesc&#39;, index: &#39;DivisionDesc&#39;, width: 300 },
                   { name: &#39;DepartmentName&#39;, index: &#39;DepartmentNumber&#39;, width: 300 },
                   { name: &#39;VendorID&#39;, index: &#39;VendorID&#39;, width: 100 },
                   { name: &#39;UPCNumber&#39;, index: &#39;UPCNumber&#39;, width: 100 },
                   { name: &#39;NCChitPrintQty&#39;, index: &#39;NCChitPrintQty&#39;, width: 300 },
                   { name: &#39;SecondScanDisp&#39;, index: &#39;SecondScanDisp&#39;, width: 300 },
                   { name: &#39;ItemsMerchandised&#39;, index: &#39;ItemsMerchandised&#39;, width: 280 },
                   { name: &#39;ItemsOnRequest&#39;, index: &#39;ItemsOnRequest&#39;, width: 280 },
                   { name: &#39;CartonCompleted&#39;, index: &#39;CartonCompleted&#39;, width: 280 },
                   { name: &#39;OpenBalance&#39;, index: &#39;OpenBalance&#39;, width: 280 },
                   { name: &#39;CartonID&#39;, index: &#39;CartonID&#39;, width: 100 },
                   { name: &#39;NCChitDate&#39;, index: &#39;NCChitDate&#39;, width: 10, key: true, hidden : true }
                   ]
                }
                else{
                cols = [&#39;Date&#39;, &#39;DIV&#39;, &#39;Dept&#39;, &#39;Vend&#39;, &#39;UPC&#39;, &#39;NC Chit Print&#39;, &#39;2nd Scan Disposition&#39;, "Items Merch&#39;d in Place", &#39;Items On Request&#39;, &#39;Carton Completed&#39;, &#39;Open Balance (Items On Request Carton Complete)&#39;, &#39;Carton ID&#39;];
              colmodels =   [
                   { name: &#39;NCChitDate&#39;, index: &#39;NCChitDate&#39;, width: 100},
                   { name: &#39;DivisionDesc&#39;, index: &#39;DivisionDesc&#39;, width: 150 },
                   { name: &#39;DepartmentName&#39;, index: &#39;DepartmentNumber&#39;, width: 200 },
                   { name: &#39;VendorID&#39;, index: &#39;VendorID&#39;, width: 50 },
                   { name: &#39;UPCNumber&#39;, index: &#39;UPCNumber&#39;, width: 100 },
                   { name: &#39;NCChitPrintQty&#39;, index: &#39;NCChitPrintQty&#39;, width: 50 },
                   { name: &#39;SecondScanDisp&#39;, index: &#39;SecondScanDisp&#39;, width: 50 },
                   { name: &#39;ItemsMerchandised&#39;, index: &#39;ItemsMerchandised&#39;, width: 50 },
                   { name: &#39;ItemsOnRequest&#39;, index: &#39;ItemsOnRequest&#39;, width: 100 },
                   { name: &#39;CartonCompleted&#39;, index: &#39;CartonCompleted&#39;, width: 50 },
                   { name: &#39;OpenBalance&#39;, index: &#39;OpenBalance&#39;, width: 50 },
                   { name: &#39;CartonID&#39;, index: &#39;CartonID&#39;, width: 100 }
                   ]
                }
            $("#" + jQuery.jgrid.jqID(subgridTableId)).jqGrid({
                mtype: "POST",
                datatype: &#39;json&#39;,
                 url: encodeURI(&#39;@Url.Action("GetnctRequestIndividualDetails")&#39; + &#39;?reqValue=&#39; + rowId),
                colNames: cols,
                colModel: colmodels,
                rowNum: 9999,
                height: &#39;100%&#39;
            });
             $(".ui-icon-carat-1-sw").css("background-image", "none");  
             }
    });
}</div></pre>
</blockquote>
]]></description>
        	        	<pubDate>Wed, 19 Mar 2014 00:10:58 +0200</pubDate>
        </item>
</channel>
</rss>