# How to get table column Type?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223>\
**Category:** Ignition\
**Created:** [October 2, 2012, 12:41pm UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223 "2012-10-02T12:41:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![skallepalli](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@skallepalli](https://forum.inductiveautomation.com/u/skallepalli)\
**Post date:** [October 2, 2012, 12:41pm UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223/1 "2012-10-02T12:41:06Z")

</div>

Inductive Team,

Is it possible to get column type from dataset like get column name (getColumName) function ?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [October 2, 2012, 3:46pm UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223/2 "2012-10-02T15:46:24Z")

</div>

Yes, you can do the following:`dataset.getColumnType(0)`Replace the 0 with whatever column index you want to get the type for.

---

<div class="post-metadata">

**Author:** ![skallepalli](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@skallepalli](https://forum.inductiveautomation.com/u/skallepalli)\
**Post date:** [October 2, 2012, 6:00pm UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223/3 "2012-10-02T18:00:16Z")

</div>

Travis,

Perfect. We tried same function before we posted and tried to show error box (system.gui.errorBox()). It does not show anything if we directly use:

```auto
system.gui.errorBox(str(dataset.getColumnType(0)))
```

It shows the value if we use, some intermediate variable. Like:

`vStr = str(dataset.getColumnType(0))
system.gui.errorBox(vStr)`  
Now all works good.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [October 2, 2012, 7:33pm UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223/4 "2012-10-02T19:33:29Z")

</div>

I think what you’re looking for is **name** , since what that getColumnType is returning is a Python “type”:

```auto
system.gui.errorBox(dataset.getColumnType(0). __name__ )
```

---

<div class="post-metadata">

**Author:** ![skallepalli](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@skallepalli](https://forum.inductiveautomation.com/u/skallepalli)\
**Post date:** [October 3, 2012, 12:19pm UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223/5 "2012-10-03T12:19:34Z")

</div>

James/Travis,

getColumnType function works perfect. We had a question which may not related to this. Is there a way to increase width of Grid lines (thick lines) for table component ?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [October 3, 2012, 3:28pm UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223/6 "2012-10-03T15:28:18Z")

</div>

Sorry, you can’t change that right now. You can hide them or change the color.

---

<div class="post-metadata">

**Author:** ![skallepalli](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@skallepalli](https://forum.inductiveautomation.com/u/skallepalli)\
**Post date:** [October 4, 2012, 3:06am UTC](https://forum.inductiveautomation.com/t/how-to-get-table-column-type/5223/7 "2012-10-04T03:06:22Z")

</div>

Thank you Travis.
