<?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: Issue Populating Data in jqGrid when DropDownList Selection is made</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/issue-populating-data-in-jqgrid-when-dropdownlist-selection-is-made</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/issue-populating-data-in-jqgrid-when-dropdownlist-selection-is-made/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Jordy1234 on Issue Populating Data in jqGrid when DropDownList Selection is made</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-populating-data-in-jqgrid-when-dropdownlist-selection-is-made#p26973</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-populating-data-in-jqgrid-when-dropdownlist-selection-is-made#p26973</guid>
        	        	<description><![CDATA[<p>Here is my problem.&#160; I can populate data into the jqGrid via a Objectdatasource on page load.&#160; I also have a dropdownlist that has 4 options to choose from.&#160; When I try to code the Grid to reload the data when a dropdownlist select is made, the data remains.&#160; I want to be able to make a selection in the dropdown and that will reload the grid with different data.&#160; It works fine in a normal grid, but for some reason jqGrid doesn&#39;t like to work.&#160; Any ideas????</p>
<p>Here is the code I&#39;m working with...</p>
<p>&#160;public partial class Employees : System.Web.UI.Page<br />&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; Employee newEmp = new Employee();</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; protected void Page_Load(object sender, EventArgs e)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; empGrid.DataSource = employeeODS;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; empGrid.DataBind();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; protected void siteDropDownList_SelectedIndexChanged1(object sender, EventArgs e)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; empGrid.DataSource = ObjectDataSource1;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; empGrid.DataBind();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</p>
<p>and my jqGrid code...</p>
<p>&#60;cc1:JQGrid ID="empGrid" runat="server" Width="484px" Height="241px"&#62;<br />&#160;&#160;&#160; &#60;Columns&#62;<br />&#160;&#160;&#160; &#60;cc1:JQGridColumn DataField="DisplayName" HeaderText="Employee Name" Width="115"&#62;&#60;/cc1:JQGridColumn&#62;<br />&#160;&#160;&#160; &#60;cc1:JQGridColumn DataField="EmployeeID" HeaderText="MyID" Width="50"&#62;&#60;/cc1:JQGridColumn&#62;<br />&#160;&#160;&#160; &#60;cc1:JQGridColumn DataField="Title" HeaderText="Title" Width="115"&#62;&#60;/cc1:JQGridColumn&#62;<br />&#160;&#160;&#160; &#60;/Columns&#62;<br />&#160;&#160;&#160; &#60;SearchToolBarSettings SearchToolBarAction="SearchOnKeyPress" /&#62;<br />&#160;&#160;&#160; &#60;PagerSettings ScrollBarPaging="true" PageSize="100" /&#62;<br />&#160;&#160;&#160; &#60;ToolBarSettings ShowSearchToolBar="true" &#62;&#60;/ToolBarSettings&#62;<br />&#160;&#160;&#160; &#60;AppearanceSettings HighlightRowsOnHover="true" ScrollBarOffset="16" /&#62;<br />&#160;&#160;&#160; &#60;/cc1:JQGrid&#62;</p>
<p>my Objectdatasource....</p>
<p>&#160;&#60;asp:ObjectDataSource ID="employeeODS" runat="server"<br />&#160;&#160;&#160; SelectMethod="GetEmployeeInfo" TypeName="Website.Employee"&#62;<br />&#160;&#160;&#160; &#60;/asp:ObjectDataSource&#62;</p>
<p>&#160;&#160;&#160; &#60;asp:ObjectDataSource ID="ObjectDataSource1" runat="server"<br />&#160;&#160;&#160; SelectMethod="GetEmployeeBySite" TypeName="Website.Employee"&#62;<br />&#160;&#160;&#160; &#60;SelectParameters&#62;<br />&#160;&#160;&#160; &#60;asp:ControlParameter ControlID="siteDropDownList" Name="Location" <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; PropertyName="SelectedValue" Type="String"&#160; /&#62;<br />&#160;&#160;&#160; &#60;/SelectParameters&#62;<br />&#160;&#160;&#160; &#60;/asp:ObjectDataSource&#62;</p></p>
]]></description>
        	        	<pubDate>Wed, 18 Jul 2012 23:58:46 +0300</pubDate>
        </item>
</channel>
</rss>