Hello,
I have two problems of clear function. I add a input & button, checked grid.
<td class=’nomal’ style=’height:30px;’>
<div id=”deviceSearchText” style=”overflow: hidden;”>
<input type=”text”/>
<div id=”deviceSearchBtn”>
</div>
</div>
</td>
<td >
<div id=”deviceSearchGrid”></div>
</td>
this is javasciprt.
$(“#deviceSearchText”).jqxInput({ placeHolder: “Enter a Device”, height: 20, width: 212, minLength: 1, theme: ‘orange’ });
$(“#deviceSearchGrid”).jqxGrid({ height: 150, width: 210, sortable: true, selectionmode: ‘checkbox’, altrows: true, theme: ‘ui-redmond’,
columns: [ { text: “Device”, datafield: ‘device’, width: 100},
{ text: “P”, datafield: ‘pkg’, width: 30},
{ text: “D”, datafield: ‘dms’, width: 30},
{ text: “L”, datafield: ‘lead’, width: 30 },
{ text: “id”, datafield: ‘deviceid’, width: 1 }
]
});
first problem of grid
1 step. click search button
result -> 1000rows input at grid
2 step. click all check box
3 step. clear grid(by $(“#deviceSearchGrid”).jqxGrid(‘clear’);)
4 step. again search button(empty input)
result -> 500row input at grid and aleady checked all id.
result -> var deviceRows = $(“#deviceSearchGrid”).jqxGrid(‘selectedrowindexes’);
deviceRows is 1500,
I need to only 500 rows.
and second problem
1 step. some text(ex, “aaa”) input at inputbox(include autocomplete data), and search button click.
result -> var selectedDeviceJson = $(“#deviceSearchText”).val();
selectedDeviceJson -> “aaa”
2 step. delete some text and search button click.
result -> selectedDeviceJson -> “aaa”
I need “Enter a Device” or “”
Thanks,