I'm using the JS API 3.29 and a FeatureTable. I would like to be able to fire events on individual cells rather than an entire row. But the only documented events are for entire rows. I found this thread where Robert Scheitlin, GISP suggested using an event based on the grid's header using mouseover, but I can't get any events like that to work, using the headers or cells or anything. Does it have something to do with using a FeatureTable rather than a base Dojo dgrid?
Tom,
You can do the same thing with a FeatureTable.
<SPAN class="token function">on</SPAN><SPAN class="punctuation token">(</SPAN>myFeatureTable<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"load"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>evt<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN> myFeatureTable<SPAN class="punctuation token">.</SPAN>grid<SPAN class="punctuation token">.</SPAN><SPAN class="token function">on</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"th.field-Spp_Code:mouseover"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN> console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">info</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"hover"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="comment token">//do your tooltip here</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Ah ok, because the grid (a dgrid) is a property of the FeatureTable. That makes sense. Thank you!
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.