4

Is it possible to disable the drag and drop option in Flexigrid?

I have a Name column which I don't want to be moved from the very 2 nd position.

Below is the example for that.

enter image description here

pinku
  • 1,139
  • 2
  • 9
  • 25
  • 2
    Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. – Rene Pot Jul 16 '13 at 09:36
  • @RenePot It is difficult to understand the question. But I got into such issue earlier. – Mohammed H Jul 16 '13 at 10:00
  • @RenePot Thanks I have added the example. I hope now it's understandable. – pinku Jul 16 '13 at 10:10

1 Answers1

5

I don't know whether there is any API option for it or not.

A small hack is remove the binding from the column. The following code you can use to remove the binding since SI-column is always first column:

 jQuery('.hDivBox th:first').unbind();

So you can add it in onSuccess callback as given below.

jQuery('#divId').flexigrid({

   onSuccess: function() {
        jQuery('.hDivBox th:first').unbind();
     },
     . . .
});

Update: There is an API option colMove. make it false to disable it. The above solution will disable the column sorting also. See https://github.com/paulopmx/Flexigrid/blob/master/js/flexigrid.js#L135

Mohammed H
  • 6,880
  • 16
  • 81
  • 127