# Set Datasetgrid column not editable

**URL:** <https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762>\
**Category:** Classic Servoy\
**Created:** [April 2, 2012, 3:35am UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762 "2012-04-02T03:35:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [April 2, 2012, 3:35am UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/1 "2012-04-02T03:35:34Z")

</div>

Hi, Is there a way to set the column of a Dataset to uneditable. I tried using “enable=‘false’” but it disabled the entire datasetgrid. I only wanted to make a few columns uneditable.

---

<div class="post-metadata">

**Author:** ![Joas](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/joas/32/5095_2.png) [@Joas](https://forum.servoy.com/u/Joas)\
**Post date:** [April 2, 2012, 2:00pm UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/2 "2012-04-02T14:00:39Z")

</div>

Can you explain a little more what you’re doing?  
Are you showing your data in a tableview? In that case you can set a column to be not editable using the element name:

```auto
elements.yourelementname.editable = false;

```

---

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [April 4, 2012, 1:49am UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/3 "2012-04-04T01:49:01Z")

</div>

Thanks for the reply.

DatasetGrid is a Servoy Bean. So, I might not be able to use your code.

---

<div class="post-metadata">

**Author:** ![Joas](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/joas/32/5095_2.png) [@Joas](https://forum.servoy.com/u/Joas)\
**Post date:** [April 4, 2012, 7:27am UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/4 "2012-04-04T07:27:17Z")

</div>

No, I thought you were using a regular table view.  
I never used the DatasetGrid bean, so I can’t help you with that.

---

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [April 10, 2012, 7:30am UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/5 "2012-04-10T07:30:00Z")

</div>

All right thanks.

Does anybody in the forum use Datasetgrid? I’m trying to figure out how I could make a column uneditable.

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [April 10, 2012, 9:31am UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/6 "2012-04-10T09:31:27Z")

</div>

Hi Erik,

I think the quickest way would be to contact the author of this bean via support at [servoy-plugins.de](http://servoy-plugins.de) .

Hope this helps.

---

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [April 10, 2012, 10:38pm UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/7 "2012-04-10T22:38:53Z")

</div>

> ROCLASI:  
> Hi Erik,
> 
> I think the quickest way would be to contact the author of this bean via support at [servoy-plugins.de](http://servoy-plugins.de) .
> 
> Hope this helps.

I emailed them and I had no replies.

---

<div class="post-metadata">

**Author:** ![erikd](https://avatars.discourse-cdn.com/v4/letter/e/b782af/32.png) [@erikd](https://forum.servoy.com/u/erikd)\
**Post date:** [April 16, 2012, 12:01am UTC](https://forum.servoy.com/t/set-datasetgrid-column-not-editable/15762/8 "2012-04-16T00:01:07Z")

</div>

Patrick replied already and the function to use is setColumnEditable(x,false), where x is the column index. Worked well.
