Hi,
I have added some javascript to the filter button that appears at the side of the text box on RAD Grid filter to basically clear the filter when the user clicks it rather than bring a menu down etc. Heres the code I used:
This works perfect first time round, I can enter a letter then filter the grid, then click the button and it clears the textbox and refreshes the grid to it's non filtered state. The problem is it just works the once, once I have click the button the filter clears when I type another a letter and hit return to filter the grid again it dosen't filter to my original setting of "StartsWith".
Thank you.
I have added some javascript to the filter button that appears at the side of the text box on RAD Grid filter to basically clear the filter when the user clicks it rather than bring a menu down etc. Heres the code I used:
<
ClientSettings
>
<
ClientEvents
OnFilterMenuShowing
=
"filterMenuShowing"
/>
</
ClientSettings
>
function
filterMenuShowing(sender, args) {
var
filterRow = args.get_tableView().get_tableFilterRow();
var
columnName = args.get_column().get_uniqueName();
var
cell = args.get_tableView()._getCellByColumnUniqueNameFromTableRowElement(filterRow, columnName);
var
filterValue = $telerik.findElement(cell,
"FilterTextBox_"
+ columnName).value;
args.set_cancel(
true
);
args.get_tableView().filter(columnName,
""
,
"NoFilter"
);
}
This works perfect first time round, I can enter a letter then filter the grid, then click the button and it clears the textbox and refreshes the grid to it's non filtered state. The problem is it just works the once, once I have click the button the filter clears when I type another a letter and hit return to filter the grid again it dosen't filter to my original setting of "StartsWith".
Thank you.