deleting row when not selected a row

deleting row when not selected a row

bugreportbugreport Posts: 10Questions: 0Answers: 0
edited September 2011 in General
When users start deleting items when they do not have selected a row you will get some errors (sometimes it will take a while)

there's a simple solution
change
var anSelected = fnGetSelected( oTable );
oTable.fnDeleteRow( anSelected[0] );

into
var anSelected = fnGetSelected( oTable );
if(anSelected.length > 0)
{
oTable.fnDeleteRow( anSelected[0] );
}

problem solved ;)
This discussion has been closed.