# Criteria for raising CustomColumnFetch event during WinformsMap.Refresh()

**URL:** <https://community.thinkgeo.com/t/criteria-for-raising-customcolumnfetch-event-during-winformsmap-refresh/1452>\
**Category:** WinForms\
**Created:** [October 6, 2010, 4:56pm UTC](https://community.thinkgeo.com/t/criteria-for-raising-customcolumnfetch-event-during-winformsmap-refresh/1452 "2010-10-06T16:56:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan2](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ryan2/32/24980_2.png) [@Ryan2](https://community.thinkgeo.com/u/Ryan2)\
**Post date:** [October 6, 2010, 4:56pm UTC](https://community.thinkgeo.com/t/criteria-for-raising-customcolumnfetch-event-during-winformsmap-refresh/1452/1 "2010-10-06T16:56:37Z")

</div>

Hello,

I&nbsp;am&nbsp;using&nbsp;the&nbsp;CustomColumnFetch&nbsp;event&nbsp;to&nbsp;assign&nbsp;column&nbsp;values&nbsp;to&nbsp;features&nbsp;when&nbsp;they&nbsp;are&nbsp;drawn&nbsp;on&nbsp;the&nbsp;map.&nbsp;&nbsp;I&nbsp;am&nbsp;noticing&nbsp;that&nbsp;some&nbsp;of&nbsp;the&nbsp;features&nbsp;requesting&nbsp;a&nbsp;column&nbsp;value&nbsp;are&nbsp;not&nbsp;in&nbsp;the&nbsp;current&nbsp;extent&nbsp;of&nbsp;the&nbsp;map.&nbsp;&nbsp;My&nbsp;question&nbsp;is,&nbsp;what&nbsp;criteria&nbsp;for&nbsp;a&nbsp;feature&nbsp;is&nbsp;this&nbsp;event&nbsp;raised&nbsp;on&nbsp;when&nbsp;refreshing&nbsp;the&nbsp;map,&nbsp;if&nbsp;it&nbsp;is&nbsp;outside&nbsp;of&nbsp;the&nbsp;current&nbsp;extent?

&nbsp;

Thank&nbsp;you.

---

<div class="post-metadata">

**Author:** ![Ryan2](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ryan2/32/24980_2.png) [@Ryan2](https://community.thinkgeo.com/u/Ryan2)\
**Post date:** [October 6, 2010, 6:07pm UTC](https://community.thinkgeo.com/t/criteria-for-raising-customcolumnfetch-event-during-winformsmap-refresh/1452/2 "2010-10-06T18:07:29Z")

</div>

This&nbsp;seems&nbsp;to&nbsp;be&nbsp;related&nbsp;to&nbsp;using&nbsp;a&nbsp;TileCache.&nbsp;&nbsp;When&nbsp;I&nbsp;don’t&nbsp;have&nbsp;one&nbsp;specified,&nbsp;it&nbsp;looks&nbsp;like&nbsp;only&nbsp;features&nbsp;inside&nbsp;the&nbsp;current&nbsp;extent&nbsp;are&nbsp;drawn.&nbsp;&nbsp;When&nbsp;enabling&nbsp;a&nbsp;TileCache,&nbsp;features&nbsp;beyond&nbsp;the&nbsp;current&nbsp;extent&nbsp;are&nbsp;drawn.&nbsp;&nbsp;Is&nbsp;there&nbsp;a&nbsp;way&nbsp;to&nbsp;get&nbsp;the&nbsp;extent&nbsp;of&nbsp;all&nbsp;the&nbsp;tiles&nbsp;being&nbsp;drawn,&nbsp;that&nbsp;way&nbsp;I&nbsp;can&nbsp;find&nbsp;all&nbsp;of&nbsp;the&nbsp;features&nbsp;that&nbsp;will&nbsp;be&nbsp;drawn&nbsp;and&nbsp;have&nbsp;this&nbsp;extent&nbsp;raised&nbsp;on?

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [October 7, 2010, 10:39pm UTC](https://community.thinkgeo.com/t/criteria-for-raising-customcolumnfetch-event-during-winformsmap-refresh/1452/3 "2010-10-07T22:39:36Z")

</div>

Ryan,

Try&nbsp;following&nbsp;code,&nbsp;hope&nbsp;it&nbsp;helps.&nbsp;The&nbsp;tile&nbsp;cache&nbsp;refers&nbsp;to&nbsp;the&nbsp;cache&nbsp;system&nbsp;you&nbsp;are&nbsp;using.  
  
&nbsp;  
`TileCache tileCache;Collection<TileMatrixCell> tileCells = tileCache.TileMatrix.GetIntersectingCells(winformsMap1.CurrentExtent);            RectangleShape tilesBoundingBox = new RectangleShape();foreach(TileMatrixCell tileMatrixCell in tileCells){    tilesBoundingBox.ExpandToInclude(tileMatrixCell.BoundingBox);}`  
  
Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.  
Thanks.  
Yang
