<?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: Refreshing drop down's data in toolbar</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/refreshing-drop-downs-data-in-toolbar</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/refreshing-drop-downs-data-in-toolbar/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Refreshing drop down's data in toolbar</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/refreshing-drop-downs-data-in-toolbar#p8695</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/refreshing-drop-downs-data-in-toolbar#p8695</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>1. Every id of the generated element when we have search toolbar is a combination of gs_ + the name from colModel</p>
<p>So if you have name myselect the correspnding  element in toolbar search select is gs_myselect</p>
<p>2. I suppose you use onSelectRow to call editGridRow - right?</p>
<p>I suggest you to use onCellSelect event and to add additional button at left or rigth to delete a row.</p>
<p>When the user click you can identify which cell is clicked and lunch the appropriate action</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 17 Aug 2009 08:06:43 +0300</pubDate>
        </item>
        <item>
        	<title>MamaliFrenchi on Refreshing drop down's data in toolbar</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/refreshing-drop-downs-data-in-toolbar#p8662</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/refreshing-drop-downs-data-in-toolbar#p8662</guid>
        	        	<description><![CDATA[<p>I had downloaded 3.5.1 and played with it. I spend my week end reading jqGrid document and I learned a lot. I got 2 problems:<br />1 &#8211; I used the integrated Search Toolbar sample with a dropdown that get its data from server. It works great, but I wanted also to refresh the data in the toolbar each time that I edit a row, or adding a new record. I couldn&#8217;t find any event , I added mygrid.filterToolbar(); and the grid add another row of toolbar with data refreshed, so I reemoved firs then add the Toolbar. $(&#39;tr.ui-search-toolbar&#39;, &#39;table.ui-jqgrid-htable&#39;).remove();<br />Is there a better way to refresh dropdwon list in the toolbar?</p>
<p>2 - I set the Edit&#160; form with selecting a ROW. All went well except delete. To delete a row you have to select a Row and in my case selecting a row brings the edit&#160; form. So I decided to add Delete button in the form as well. I could not find a built in function or property to add the button. For this reason I coded a new form.&#160; In afterShowForm event I added the following code:<br />afterShowForm: function(form) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var deletelink = &#39;&#60;a id="dData" class="fm-button ui-state-default ui-corner-all fm-button-icon-left" &#39;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; deletelink += &#39;href="javascript:void(0)"&#62; &#39;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; deletelink += &#39;Delete&#60;span class="ui-icon ui-icon-trash"/&#62;&#60;/a&#62;&#39;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;td.navButton&#39;, &#39;tr#Act_Buttons&#39;).empty().append(deletelink);<br />// I removed the Previous Next link and add Delete icon and save the current Row Id in a global variable RowID<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; rowID = id;<br />then I added a live click event to this link:<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;a[id=dData]&#39;).live(&#39;click&#39;, function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;div[id=editmodmyList]&#39;).remove(); // close the Edit form<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;div.jqmOverlay&#39;).remove(); // remove the overlay<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#myList&#39;).delGridRow(rowID); // delete the row and reload the delete button works great as expected. I hava little problem.in order to refresh data in the toolbar, I added afterSubmit event of delGridRow, but the code call server to refresh the toolbar, but it doesn&#8217;t refresh the grid, nor close the delete form. Am I doing something wrong? I would really appreciate any help to make those requirement, specially if there are easier way to make it. Thanks </p>
]]></description>
        	        	<pubDate>Sun, 16 Aug 2009 23:17:08 +0300</pubDate>
        </item>
</channel>
</rss>