user2041398
user2041398

Reputation: 1

prevent drag drop on particular column using slickgrid

I am using slick grid 2.0 and I want to prevent drag drop on a few columns and prevent column reordering of those columns ( fixed column position).

I am able to do this with slight modifications in Slickgrid.js by passing the column names to the setupColumnReorder() function. But is there any other way to do this instead of modifying core files like Slickgrid.js?

Upvotes: 0

Views: 1261

Answers (1)

ghiscoding
ghiscoding

Reputation: 13204

Are you talking about removing the possibility of user doing a column reorder? If that is what you are trying to achieve you can use this property enableColumnReorder: false inside your list of options for example:

var options = {
  editable: true,
  enableAddRow: true,
  enableCellNavigation: true,
  asyncEditorLoading: true,
  forceFitColumns: false,
  topPanelHeight: 25,
  enableColumnReorder: false
};

This blocks the reordering of all columns

Upvotes: 1

Related Questions