<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problems with loadingMessage and noDataMessage in OnDemandGrid in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418762#M38488</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a grid that is populating from a query and queryTask using specific parameters.&amp;nbsp; I want my OnDemandGrid to show a loading message and a no data message, which I understand can be done inside the code for creating the OnDemandGrid.&amp;nbsp; For some reason when I do it this way, the message for noDataMessage comes into the grid at the bottom of the results when they are there, but nothing comes into the grid while the user is waiting for the data to populate.&amp;nbsp; Here is the code for my creation of the grid along with the queryTask and query that are associated with it.&amp;nbsp; I did not add in any css for the messages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function execute() {
 var queryTask = new QueryTask(window.historicalUrl);
 var timeExtent= new TimeExtent();
 timeExtent.startTime=new Date(dom.byId("date").value);
 timeExtent.endTime=new Date(dom.byId("date2").value);
 var query = new Query();
 query.returnGeometry = false;
 query.outFields = window.historicalOutFields;
 query.text = dom.byId("mydropdown").value;
 query.timeExtent = timeExtent;
 queryTask.execute(query, function(results) {
&amp;nbsp;&amp;nbsp; var data = [];
&amp;nbsp;&amp;nbsp; var data = array.map(results.features, function(feature) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; return {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //property names used here match those used when creating the dgrid
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Velocity": feature.attributes[window.historicalOutFields[0]],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SpeedLimit": feature.attributes[window.historicalOutFields[1]],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "StreetName": feature.attributes[window.historicalOutFields[2]],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "TimeStamp": feature.attributes[window.historicalOutFields[3]]
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; });
&amp;nbsp; var memStore = new Memory({ data: data });
&amp;nbsp; //create historical data dgrid
&amp;nbsp; window.grid3 = new (declare([OnDemandGrid, Selection]))({
&amp;nbsp;&amp;nbsp; bufferRows: Infinity,
&amp;nbsp;&amp;nbsp; store:memStore,
&amp;nbsp;&amp;nbsp; maxRowsPerPage: 5000,
&amp;nbsp;&amp;nbsp; columns: {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; "Velocity": { "label": "Speed (MPH)", "formatter": dojoNum.format },
&amp;nbsp;&amp;nbsp;&amp;nbsp; "SpeedLimit":{"label": "Speed Limit", "formatter":dojoNum.format},
&amp;nbsp;&amp;nbsp;&amp;nbsp; "StreetName": "On Street",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "TimeStamp": {"label": "Last Contact", "formatter": formatTimestamp}
&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp; loadingMessage: "Loading data...",
&amp;nbsp;&amp;nbsp; noDataMessage: "No results found."
&amp;nbsp; }, "grid3");
&amp;nbsp; grid3.set("sort", [{attribute:"TimeStamp", descending:true}]);
&amp;nbsp; //window.grid3.set("store", memStore);
 });
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is much appreciated, thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Apr 2014 16:12:48 GMT</pubDate>
    <dc:creator>MichelleRogers1</dc:creator>
    <dc:date>2014-04-10T16:12:48Z</dc:date>
    <item>
      <title>Problems with loadingMessage and noDataMessage in OnDemandGrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418762#M38488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a grid that is populating from a query and queryTask using specific parameters.&amp;nbsp; I want my OnDemandGrid to show a loading message and a no data message, which I understand can be done inside the code for creating the OnDemandGrid.&amp;nbsp; For some reason when I do it this way, the message for noDataMessage comes into the grid at the bottom of the results when they are there, but nothing comes into the grid while the user is waiting for the data to populate.&amp;nbsp; Here is the code for my creation of the grid along with the queryTask and query that are associated with it.&amp;nbsp; I did not add in any css for the messages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
function execute() {
 var queryTask = new QueryTask(window.historicalUrl);
 var timeExtent= new TimeExtent();
 timeExtent.startTime=new Date(dom.byId("date").value);
 timeExtent.endTime=new Date(dom.byId("date2").value);
 var query = new Query();
 query.returnGeometry = false;
 query.outFields = window.historicalOutFields;
 query.text = dom.byId("mydropdown").value;
 query.timeExtent = timeExtent;
 queryTask.execute(query, function(results) {
&amp;nbsp;&amp;nbsp; var data = [];
&amp;nbsp;&amp;nbsp; var data = array.map(results.features, function(feature) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; return {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //property names used here match those used when creating the dgrid
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Velocity": feature.attributes[window.historicalOutFields[0]],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SpeedLimit": feature.attributes[window.historicalOutFields[1]],&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "StreetName": feature.attributes[window.historicalOutFields[2]],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "TimeStamp": feature.attributes[window.historicalOutFields[3]]
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; });
&amp;nbsp; var memStore = new Memory({ data: data });
&amp;nbsp; //create historical data dgrid
&amp;nbsp; window.grid3 = new (declare([OnDemandGrid, Selection]))({
&amp;nbsp;&amp;nbsp; bufferRows: Infinity,
&amp;nbsp;&amp;nbsp; store:memStore,
&amp;nbsp;&amp;nbsp; maxRowsPerPage: 5000,
&amp;nbsp;&amp;nbsp; columns: {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; "Velocity": { "label": "Speed (MPH)", "formatter": dojoNum.format },
&amp;nbsp;&amp;nbsp;&amp;nbsp; "SpeedLimit":{"label": "Speed Limit", "formatter":dojoNum.format},
&amp;nbsp;&amp;nbsp;&amp;nbsp; "StreetName": "On Street",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "TimeStamp": {"label": "Last Contact", "formatter": formatTimestamp}
&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp; loadingMessage: "Loading data...",
&amp;nbsp;&amp;nbsp; noDataMessage: "No results found."
&amp;nbsp; }, "grid3");
&amp;nbsp; grid3.set("sort", [{attribute:"TimeStamp", descending:true}]);
&amp;nbsp; //window.grid3.set("store", memStore);
 });
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is much appreciated, thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 16:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418762#M38488</guid>
      <dc:creator>MichelleRogers1</dc:creator>
      <dc:date>2014-04-10T16:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loadingMessage and noDataMessage in OnDemandGrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418763#M38489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have dealt with this before and unfortunately, both loadingMessage and noDataMessage are a bit vague. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; According to the dgrid documentation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;loadingMessage&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;An optional message to be displayed in the loading node which appears when a new page of results is requested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;noDataMessage&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;An optional message to be displayed when a query yields no results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like loadingMessage will only trigger while the grid waits for new data to render and not while the data is loading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you are using an onDemandGrid, that will only happen if you scroll down really fast when using a gigantic dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It also looks like noDataMessage only displays when using a query with your dgrid, and that query returns null. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if you set a query on the dgrid before your data is loaded, the noDataMessage will display. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With this in mind, if you want to have a true loading indicator, you will have to use a combination of JS and CSS. This is easier than it sounds. I said earlier that the noDataMessage will show if you apply a query to your dgrid before the data is loaded. You can use this to your advantage. You can treat noDataMessage as a placeholder for your loading message (or set it to "" if you are going to use an image gif). The noDataMessage is contained in the following div:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;div class="dgrid-no-data"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can modify this div to be your loading indicator container. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is one I use on a personal site:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
.dgrid-no-data {
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-image: url("../images/loaders/loading_blue.gif");
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-position: center center;
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-repeat: no-repeat;
&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 100%;
&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: center;
&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 100%;


}


&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've attached the image I use. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;***&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Off topic but I wanted to make sure you set the idProperty on your store (the unique ID) so that dgrid can properly sort and query your data set. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE: the default value of idProperty is "id" so if that happens to be your uid field, then you can ignore this. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var memStore = new Memory({ data: data, idProperty: "UNIQUE_ID_FIELD_GOES_HERE"});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps, even if not exactly what you expected.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418763#M38489</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2021-12-11T18:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loadingMessage and noDataMessage in OnDemandGrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418764#M38490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have dealt with this before and unfortunately, both loadingMessage and noDataMessage are a bit vague. &lt;BR /&gt;&lt;BR /&gt; According to the dgrid documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;loadingMessage&lt;/STRONG&gt;&lt;BR /&gt;An optional message to be displayed in the loading node which appears when a new page of results is requested.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;noDataMessage&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;An optional message to be displayed when a query yields no results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;It looks like loadingMessage will only trigger while the grid waits for new data to render and not while the data is loading.&lt;BR /&gt;Since you are using an onDemandGrid, that will only happen if you scroll down really fast when using a gigantic dataset.&lt;BR /&gt;&lt;BR /&gt;It also looks like noDataMessage only displays when using a query with your dgrid, and that query returns null. &lt;BR /&gt;However, if you set a query on the dgrid before your data is loaded, the noDataMessage will display. &lt;BR /&gt;&lt;BR /&gt;With this in mind, if you want to have a true loading indicator, you will have to use a combination of JS and CSS. This is easier than it sounds. I said earlier that the noDataMessage will show if you apply a query to your dgrid before the data is loaded. You can use this to your advantage. You can treat noDataMessage as a placeholder for your loading message (or set it to "" if you are going to use an image gif). The noDataMessage is contained in the following div:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;div class="dgrid-no-data"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;You can modify this div to be your loading indicator container. &lt;BR /&gt;&lt;BR /&gt;This is one I use on a personal site:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
.dgrid-no-data {
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-image: url("../images/loaders/loading_blue.gif");
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-position: center center;
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-repeat: no-repeat;
&amp;nbsp;&amp;nbsp;&amp;nbsp; height: 100%;
&amp;nbsp;&amp;nbsp;&amp;nbsp; text-align: center;
&amp;nbsp;&amp;nbsp;&amp;nbsp; width: 100%;


}


&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I've attached the image I use. &lt;BR /&gt;&lt;BR /&gt;***&lt;BR /&gt;Off topic but I wanted to make sure you set the idProperty on your store (the unique ID) so that dgrid can properly sort and query your data set. &lt;BR /&gt;NOTE: the default value of idProperty is "id" so if that happens to be your uid field, then you can ignore this. &lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var memStore = new Memory({ data: data, idProperty: "UNIQUE_ID_FIELD_GOES_HERE"});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps, even if not exactly what you expected.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jon,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just tried this, but the problem that I have is that we have other grids that don't always have something in them, and the grid that we want the loading on, doesn't automatically populate, instead, the grid shows up when a button is clicked to start the query and queryTask.&amp;nbsp; Also, we were wanting the user to know when there are no records for the query that they searched for, and by putting this in there, that is not possible.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418764#M38490</guid>
      <dc:creator>MichelleRogers1</dc:creator>
      <dc:date>2021-12-11T18:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loadingMessage and noDataMessage in OnDemandGrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418765#M38491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Also, we were wanting the user to know when there are no records for the query that they searched for, and by putting this in there, that is not possible.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's totally possible; you would just need to write your own logic to update the contents of that div depending on a) the query and b) the results. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pseudo Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Default Grid State
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.noDataMessage = "";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.refresh();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //When the query is executed...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.noDataMessage = "Loading...";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.refresh();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //When the query is done...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //div only shows if query returns nothing... this is just in case of that
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.noDataMessage = "No Results.";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.refresh();

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is using text of course. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Logic for using an image would differ slightly in that I would create a child div inside of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;div class="dgrid-no-data"&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... and use that div to show the spinner gif.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418765#M38491</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2021-12-11T18:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loadingMessage and noDataMessage in OnDemandGrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418766#M38492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It's totally possible; you would just need to write your own logic to update the contents of that div depending on a) the query and b) the results. &lt;BR /&gt;&lt;BR /&gt;Pseudo Code:&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Default Grid State
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.noDataMessage = "";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.refresh();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //When the query is executed...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.noDataMessage = "Loading...";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.refresh();

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //When the query is done...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //div only shows if query returns nothing... this is just in case of that
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.noDataMessage = "No Results.";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grid.refresh();

&lt;/PRE&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess I am confused on where this code would go.&amp;nbsp; I have only been dealing with esri's javascript api for about 4 months, and javascript in general for about a year.&amp;nbsp; I can post the full code to a jsfiddle if needed so that you have a better understanding of what I'm trying to do, you would have to replace the service with a public facing one as ours is sensitive information so it's not public.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:56:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418766#M38492</guid>
      <dc:creator>MichelleRogers1</dc:creator>
      <dc:date>2021-12-11T18:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loadingMessage and noDataMessage in OnDemandGrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418767#M38493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I guess I am confused on where this code would go.&amp;nbsp; I have only been dealing with esri's javascript api for about 4 months, and javascript in general for about a year.&amp;nbsp; I can post the full code to a jsfiddle if needed so that you have a better understanding of what I'm trying to do, you would have to replace the service with a public facing one as ours is sensitive information so it's not public.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A JSFiddle would be great!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 19:30:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418767#M38493</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2014-04-10T19:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loadingMessage and noDataMessage in OnDemandGrid</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418768#M38494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;A JSFiddle would be great!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the JSFiddle:&lt;/SPAN&gt;&lt;A href="http://jsfiddle.net/mrogers83/kT86X/"&gt;http://jsfiddle.net/mrogers83/kT86X/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 19:42:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-with-loadingmessage-and-nodatamessage-in/m-p/418768#M38494</guid>
      <dc:creator>MichelleRogers1</dc:creator>
      <dc:date>2014-04-10T19:42:02Z</dc:date>
    </item>
  </channel>
</rss>

