hi,
How to make TextBox search at outside GridView the example GridView, like above example.
When typing in the TextBox.
1. can search every column
2. can search last record or first record without change page size, using search with javascript like code below.
function Search_Gridview(strKey) {
var strData = strKey.value.toLowerCase().split(" ");
var tblData = document.getElementById("<%=gridview1.ClientID %>");
var rowData;
for (var i = 1; i < tblData.rows.length; i++) {
rowData = tblData.rows[i].innerHTML;
var styleDisplay = 'none';
for (var j = 0; j < strData.length; j++) {
if (rowData.toLowerCase().indexOf(strData[j]) >= 0)
styleDisplay = '';
else {
styleDisplay = 'none';
break;
}
}
tblData.rows[i].style.display = styleDisplay;
}
}
How applicated it
thanks