Disable drag and drop option in Flexigrid jQuery?

Can I turn off the drag and drop option in Flexigrid?

I have a Name column that I don't want to move from 2nd position.

Below is an example of this.

enter image description here

+4
source share
1 answer

I don’t know if it has any API option or not.

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

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

This way you can add it to the onSuccess callback as follows.

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

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

+4
source

Source: https://habr.com/ru/post/1491611/


All Articles