OK in short, I have one grid that, based on row selection, populates another grid. I would like filtering on the first grid to "reset"/"clear" the second grid, and obviously filter the first grid. The problem I'm seeing is that only one event will fire - if I make the filter happen first, the filter works but the .fireCommand() event doesn't fire. If I make the .fireCommand() event first, the event is fired but the filter doesn't happen. Code for the filter function below.
function
NameChanged(sender) {
var
firstGrid = $find(
"<%= rgUsers.ClientID %>"
).get_masterTableView();
var
secondGrid = $find(
"<%= rgAccess.ClientID %>"
).get_masterTableView();
if
(sender.get_value() ==
""
) {
tableView.filter(
"gbcFullName"
, sender.get_value(),
"NoFilter"
);
}
else
{
tableView.filter(
"gbcFullName"
, sender.get_value(),
"Contains"
);
}
secondGrid.fireCommand(
"Clear"
,
""
);
}