I find your question interesting so before all +1 from me.
You can't change the value of defaultSearch
parameter of filtertoolbar
, but you can change dynamically:
$("#list").jqGrid('setColProp','name',{searchoptions:{sopt:['cn']}});
In the demo the initial searching option in the 'Client' column defined by defaultSearch
and is 'cn'. By clicking on two buttons above the grid you can change the option to 'bw' (begin with) or 'ew' (end with). You can easy verify on the demo that the way work.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…