Although I have no doubt that this was answered, I cannot find an excellent answer to my question.
I have a table for which I would like to filter rows based on whether they contain a hidden field corresponding to the value.
I understand that this technique tends to "show all rows", "filter a set", "show / hide that filtered set"
I have the following jquery, but I am wise with a filter, and my filtered set seems to always contain no elements.
My table is regular
<table>
<tr><td>header></td><td> </tr>
<tr>
<td>a visible cell</td><td><input type='hidden' id='big-asp.net-id' value='what-im-filtering-on' />
</td>
</tr>
</table>
My goal is to be able to match tr, whose descendants contain hidden input containing either true or false.
( ), .
function OnFilterChanged(e){
var checkedVal = $("#filters input[type='radio']:checked").val();
var allRows = $("#match-grid-container .tabular-data tr");
if(checkedVal=="all"){
allRows.show();
}
else if(checkedVal=="matched"){
allRows.show();
allRows.filter(function(){$(this).find("input[type='hidden'][id~='IsAutoMatchHiddenField']")}).hide();
}
else if(checkedVal=="unmatched"){
}
}
? $(this), , ?
,
, , . , true/false . , asp.net INamingContainer
allRows.show();
allRows.filter(function(){
return $(this).find(
"input[type='hidden'][id$='IsAutoMatchHiddenField']").val() == "False";
}).hide();