<?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 and user rights.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights</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/jqgrid-and-user-rights/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>lorife on jqgrid and user rights.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16708</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16708</guid>
        	        	<description><![CDATA[<p>I made it!</p>
<p>in the php file, when the user logs in I set a JS variable vIsAdmin="TRUE".</p>
<p>in the file mycustom.js I check that variable and i create the pager accordingly.</p>
</p>
<p>Probably there is a better way to do it, but this way it works too....</p>
</p>
<p>Lorenzo</p>
]]></description>
        	        	<pubDate>Mon, 26 Apr 2010 15:49:01 +0300</pubDate>
        </item>
        <item>
        	<title>lorife on jqgrid and user rights.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16682</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16682</guid>
        	        	<description><![CDATA[<p>Hi Tony,&#160;</p>
<p>thank you for answering. No, it&#39;s not a jqgrid problem, the grid works perfectly.It&#39;s just that I am not able to change the possibility to edit/insert/delete records AFTER the grid creation.</p>
</p>
<p>So you are saying I should create 2 grids identical, one which I can edit and the other locked and then decide which one to show depending if the user is logged or not?</p>
</p>
<p>Isn&#39;t there a way to link to the grid from php and just change the property of the grid?</p>
</p>
<p>Sorry if the question is stupid, I&#39;m very new in web programming. It would be great if you could provide me with a couple of detailed lines..I can&#39;t find any example anywhere..</p>
</p>
<p>btw, thank you so much for this great grid!</p>
</p>
<p>Thank you so much,</p>
<p>Lorenzo</p>
]]></description>
        	        	<pubDate>Mon, 26 Apr 2010 13:46:46 +0300</pubDate>
        </item>
        <item>
        	<title>tony on jqgrid and user rights.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16679</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16679</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I do not think it is a jqGrid problem. Just a opinion</p>
<p>Maybe you will need to define somethings like this</p>
<p>$grid1 = &#60;&#60;&#60;GRID1</p>
<p>here first code</p>
<p>GRID1</p>
<p>$grid2 = &#60;&#60;&#60;GRID2</p>
<p>here second code</p>
<p>GRID2;</p>
</p>
<p>And the echo the $grid1 and $grid2 depending on conditions</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 26 Apr 2010 13:31:01 +0300</pubDate>
        </item>
        <item>
        	<title>lorife on jqgrid and user rights.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16577</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16577</guid>
        	        	<description><![CDATA[<p>Anybody can help me, please?</p>
]]></description>
        	        	<pubDate>Wed, 21 Apr 2010 14:40:54 +0300</pubDate>
        </item>
        <item>
        	<title>lorife on jqgrid and user rights.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16509</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-and-user-rights#p16509</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I&#39;m using php and a mysql db to manage user login in my website.</p>
<p>For now, just administrators can login in the website, so in PHP i can check if they are logged in using:</p>
</p>
<p>if($session-&#62;logged_in){</p>
<p>}</p>
</p>
<p>I&#39;m using the file mycustom.js to load create the jqgrid like this:</p>
</p>
<p>jQuery(document).ready(function(){</p>
<p><span style="white-space: pre;"> </span>jQuery("#griglia-negozi").jqGrid(&#39;navGrid&#39;,&#39;#pager-griglia-negozi&#39;, {refresh: true, edit: false, add: false, del: false,</p>
<p><span style="white-space: pre;"> </span>search:false},{},{},{},{multipleSearch:true, closeAfterSearch: true, closeOnEscape: true},{});</p>
<p>);</p>
</p>
<p>the problem is that I would like the grid to be editable if a user is logged in, but I don&#39;t know how to integrate a php "if clause" in the file mycustom.js to achieve something like:</p>
</p>
<p>&#60;?php</p>
<p><span style="white-space: pre;"> </span>if($session-&#62;logged_in){</p>
<p>?&#62;</p>
<p><span style="white-space: pre;"> </span>jQuery(document).ready(function(){</p>
<p><span style="white-space: pre;"> </span>jQuery("#griglia-negozi").jqGrid(&#39;navGrid&#39;,&#39;#pager-griglia-negozi&#39;, {<span style="color: #ff0000;">refresh: true, edit: false, add: false, del: false,</span></p>
<p><span style="white-space: pre;"><span style="color: #ff0000;"> </span></span><span style="color: #ff0000;">search:false</span>},{},{},{},{multipleSearch:true, closeAfterSearch: true, closeOnEscape: true},{});</p>
<p><span style="white-space: pre;"> </span>);</p>
</p>
<p>&#60;?php</p>
<p>} else</p>
<p>{</p>
<p>?&#62;</p>
<p><span style="white-space: pre;"> </span>jQuery(document).ready(function(){</p>
<p><span style="white-space: pre;"> </span>jQuery("#griglia-negozi").jqGrid(&#39;navGrid&#39;,&#39;#pager-griglia-negozi&#39;, {<span style="color: #ff0000;">refresh: true, edit: true, add: true, del: true,</span></p>
<p><span style="white-space: pre;"><span style="color: #ff0000;"> </span></span><span style="color: #ff0000;">search:true</span>},{},{},{},{multipleSearch:true, closeAfterSearch: true, closeOnEscape: true},{});</p>
<p><span style="white-space: pre;"> </span>);</p>
<p>&#60;?php</p>
<p>}&#160;</p>
<p>?&#62;</p>
</p>
<p>Could you help me?</p>
</p>
<p>thank you,</p>
<p>Lorenzo</p>
]]></description>
        	        	<pubDate>Mon, 19 Apr 2010 11:58:34 +0300</pubDate>
        </item>
</channel>
</rss>