tags:

views:

191

answers:

2

Is it possible to turn off the row selection feature on Flexigrid? It's somewhat annoying when you haven't implemented anything that makes use of the selection.

alt text

+3  A: 

Turns out you need to change the singleSelect property to true.

singleSelect: true
Mr. Flibble
+2  A: 

Unfortunately this does not stop all selection capability, it merely restricts it to one row. To disable it completely, add a new property to the $.extend block (around line 20)

// apply default properties
p = $.extend({
<SNIP>
onSubmit: false, // using a custom populate function
disableSelect: true

Then in the .click section of the row (around line 754) add a check for the property

$(this)
.click(
 function (e)
 {
  var obj = (e.target || e.srcElement); if (obj.href || obj.type) return true;
  if (p.disableSelect) return true;
  $(this).toggleClass('trSelected');
  if (p.singleSelect) $(this).siblings().removeClass('trSelected');
 }
)
Flapper