<?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: Some rows to read-only in jqgrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/some-rows-to-read-only-in-jqgrid</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/help/some-rows-to-read-only-in-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Some rows to read-only in jqgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/some-rows-to-read-only-in-jqgrid#p31240</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/some-rows-to-read-only-in-jqgrid#p31240</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Â </p>
<p>The beforeEditCell will not work, since it is called after the check of non-editable-cell.</p>
<p>You can set a class not-editable-cell using cellattr event. See doc and this forum how to use it.</p>
<p>Â </p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 21 Oct 2014 12:57:35 +0300</pubDate>
        </item>
        <item>
        	<title>mcfarland on Some rows to read-only in jqgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/some-rows-to-read-only-in-jqgrid#p31225</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/some-rows-to-read-only-in-jqgrid#p31225</guid>
        	        	<description><![CDATA[<div class="spPostContent">
Hi,</p>
<p>Â  i have a column(Desc) in my gird as editable</p>
<p>{ name:'tDesc', index: 'Desc', width: 256, stype: 'text', sortable: false, editable: true, edittype: 'select',editoptions: {readonly: true},formatter: rowColorFormatter,editoptions: { value:"pre:pre; post:post" }},</p>
<p>and another column is date column which is not editable</p>
<p>{ name:'Date', index: 'Date', width: 256, editable: true, stype: 'text', sortable: true, sorttype: 'date', editoptions: { disabled: "disabled"} }</p>
<p>now based on date column i need to control some ofÂ the records to read only.</p>
<p>The logic is thatÂ toÂ find the start date for this week and the start date for next week and only allow rows where the date is &#62;= the start date for this week and &#60; the start date for next week.</p>
<p>so i used in my aspx as like this</p>
<p>Â var curr = new Date;</p>
<p>var firstday = new Date(curr.setDate(curr.getDate() - curr.getDay()));</p>
<p>Â unction GetNextWeekStart() {</p>
<p>Â var today = moment();</p>
<p>Â var daystosunday = 0 - (1 - today.isoWeekday()) + 7;</p>
<p>Â var nextSunday = today.subtract('days', daystoSunday);</p>
<p>Â return nextSunday;}</p>
<p>Â </p>
<p>How can i use the above method in before edit cell to fulfill my requirement?</p>
<p>Â </p>
<p>beforeEditCell: function (rowid,name,val,iRow,iCol){<br />
Â Â if (rowid == 1){</p>
<p>Â Â  jQuery("#jqg_"+id,"#results").attr('editable',false);}},</p>
<p>Â </p>
<p>If your looking for cell level changes I suggest:</p>
<p>$("#results").removeClass('edit-cell').setCell(rowid,'columnname','','not-editable-cell');</p>
</div>
]]></description>
        	        	<pubDate>Tue, 14 Oct 2014 20:13:58 +0300</pubDate>
        </item>
</channel>
</rss>