Show Find Task results in DataGrid-JS API 3.1/AGS 10

747
1
Jump to solution
08-23-2012 07:50 AM
JK
by
Occasional Contributor
I'm running into an issue where I'm not able to return a list of results into a data grid.  I'm able to make the code work from the "Show Find Task results in DataGrid" section in the Samples section.  So originally I used the text box to enter criteria.  Works fine.  I then decided I needed to control the criteria entered and sent so I replaced the text box with an input select.  It works while keeping the form element's ID the same-makes sense.  However when I change the input select to a dojo input filteringselect it fails to return the data into the data grid.

Sends criteria and return rows:
<input type="text" id="ownerName" size="60" value="Katz" />

Sends criteria and return rows:
<select id="ownerName">
<option value="1">1</option>
..........
...........

Doesn't return rows:
dojo.require("dijit.form.Select");
<select id="ownerName"  data-dojo-type="dijit.form.FilteringSelect">
<option value="1">1</option>
..........
...........


It appears the criteria is being sent as I can see it when I wrap JS alerts around the values:
alert(dojo.byId("ownerName").value);
alert(findParams.searchText);

It appears the grid load fails grid here: grid.setStore(store);  I'm developing and testing to IE8.  Using Firebug in FF it appears the store variable doesn't contain the records.  I'm not getting any errors so hopefully it's an easy fix.  Any help would be great.  Thanks!
0 Kudos
1 Solution

Accepted Solutions
JK
by
Occasional Contributor
Found the issue.  I replaced findParams.searchText = dojo.byId("ownerName").value; with findParams.searchText = dijit.byId("ownerName").value;

View solution in original post

0 Kudos
1 Reply
JK
by
Occasional Contributor
Found the issue.  I replaced findParams.searchText = dojo.byId("ownerName").value; with findParams.searchText = dijit.byId("ownerName").value;
0 Kudos