Ariod
Ariod

Reputation: 5851

Dojo DataGrid - preventing column resize

Is there a way to set a fixed column size in Dojo DataGrid, and not allow it to be resized by the user? Thanks.

Upvotes: 0

Views: 6211

Answers (1)

Ken Franqueiro
Ken Franqueiro

Reputation: 10559

The cells defined within the grid's structure support a boolean noresize property. Setting this to true will disable resizing on that particular cell.

You might want to do something about overriding the default CSS though - it appears to use a rather noticeable cursor when hovering over non-resizable cell boundaries.

You can also set a specific width of a column in the structure using the width property on a particular cell.

Example: http://jsfiddle.net/kfranqueiro/qNfC9/

Upvotes: 2

Related Questions