Hello,
I've been using client-side binding for several radgrids on my page. I have a need to clear all of their datasources simultaneously at some points. I want to be elegant and loop through all the grids instead of explicitly clearing them line by line.
I want to do something like this:
var
grid = document.getElementsByClassName(
'SubRadGrid'
);
$(
'.SubRadGrid'
).each(
function
(){
})
And not like this:
var
empty = [];
var
grid1 = $find(
"<%= RadGrid1.ClientID %>"
).get_masterTableView();
grid1 .set_dataSource(empty);
grid1 .dataBind();
var
grid2 = $find(
"<%= RadGrid2.ClientID %>"
).get_masterTableView();
grid2 .set_dataSource(empty);
grid2 .dataBind();
var
grid3 = $find(
"<%= RadGrid3.ClientID %>"
).get_masterTableView();
grid3 .set_dataSource(empty);
grid3 .dataBind();