# EuiTableStickyColDirective

**Type:** directive

<p>Directive used to activate the sticky feature on a column of the table.</p>
<h3>Basic Usage</h3>
<b>Example :</b><div><pre class="line-numbers"><code class="language-html">&lt;div class=&quot;eui-table__scrollable-wrapper&quot; style=&quot;width: 800px; height: 600px; overflow: auto&quot; tabindex=&quot;0&quot;&gt;
    &lt;table euiTable hasStickyHeader hasStickyFooter hasStickyCols [data]=&quot;data&quot; style=&quot;width: 1400px&quot;&gt;
        &lt;ng-template euiTemplate=&quot;header&quot;&gt;
            &lt;tr&gt;
                &lt;th isStickyCol&gt;Country&lt;/th&gt;
                &lt;th&gt;Year&lt;/th&gt;
                &lt;th&gt;ISO&lt;/th&gt;
                &lt;th&gt;Population&lt;/th&gt;
                &lt;th&gt;Capital city&lt;/th&gt;
            &lt;/tr&gt;
        &lt;/ng-template&gt;
        &lt;ng-template let-row euiTemplate=&quot;body&quot;&gt;
            &lt;tr&gt;
                &lt;td isStickyCol&gt;{{ row.country }}&lt;/td&gt;
                &lt;td&gt;{{ row.year }}&lt;/td&gt;
                &lt;td&gt;{{ row.iso }}&lt;/td&gt;
                &lt;td&gt;{{ row.population | number }}&lt;/td&gt;
                &lt;td&gt;{{ row.capital }}&lt;/td&gt;
            &lt;/tr&gt;
        &lt;/ng-template&gt;
        &lt;ng-template euiTemplate=&quot;footer&quot;&gt;
            &lt;tr&gt;
                &lt;td isStickyCol class=&quot;eui-u-text-center&quot;&gt;Footer&lt;/td&gt;
                &lt;td class=&quot;eui-u-text-center&quot;&gt;Footer&lt;/td&gt;
                &lt;td class=&quot;eui-u-text-center&quot;&gt;Footer&lt;/td&gt;
                &lt;td class=&quot;eui-u-text-center&quot;&gt;Footer&lt;/td&gt;
                &lt;td class=&quot;eui-u-text-center&quot;&gt;Footer&lt;/td&gt;
            &lt;/tr&gt;
        &lt;/ng-template&gt;
    &lt;/table&gt;
&lt;/div&gt;</code></pre></div><p>Typescript logic</p>
<b>Example :</b><div><pre class="line-numbers"><code class="language-ts">data: Country[] = [
    { id: 1, country: &#39;Belgium&#39;, year: 1958, iso: &#39;BE&#39;, population: 11198638, capital: &#39;Brussels&#39; },
]</code></pre></div>

**Selector:** `th[isStickyCol], td[isStickyCol]`

**Standalone:** false
