Hi there,
I'm having performance problems with some client-side code that programmatically selects rows in my grid. The grid has 20 columns of varying type - template columns and bound columns. There's also a checkbox column as my grid is multi-select enabled.
Above my grid I've put a series of span elements with an onclick handler that allow the user to quickly select rows in the grid with a single click:
Select all | Deselect all | Select payables | Select receivables
Here's the code I use to do the selection:
This does work, but if I have over 50 rows in my grid then it starts to run slowly, and if I have 100 rows in the grid I get the Internet Explorer dialog that warns that a script is running slowly.
There is code in the grid row selecting, selected, and deselected client-side events, but I set a flag at runtime indicating that I'm selecting rows programmatically so that the event handlers return without doing anything while the programmatic selection takes place.
So, two questions...
1. Is there a way of speeding up the programmatic selection any more?
2. If not then is there a way of displaying a loading panel using only client-side code, no postbacks?
Many thanks in advance,
Rob
I'm having performance problems with some client-side code that programmatically selects rows in my grid. The grid has 20 columns of varying type - template columns and bound columns. There's also a checkbox column as my grid is multi-select enabled.
Above my grid I've put a series of span elements with an onclick handler that allow the user to quickly select rows in the grid with a single click:
Select all | Deselect all | Select payables | Select receivables
Here's the code I use to do the selection:
// Pick up the grid's master table |
var masterTable = $find("<%= grdResults.ClientID %>").get_masterTableView(); |
// Loop through the grid's items |
for(var i=0;i<masterTable.get_dataItems().length;i++) |
{ |
masterTable.selectItem(masterTable.get_dataItems()[i].get_element()); |
} |
This does work, but if I have over 50 rows in my grid then it starts to run slowly, and if I have 100 rows in the grid I get the Internet Explorer dialog that warns that a script is running slowly.
There is code in the grid row selecting, selected, and deselected client-side events, but I set a flag at runtime indicating that I'm selecting rows programmatically so that the event handlers return without doing anything while the programmatic selection takes place.
So, two questions...
1. Is there a way of speeding up the programmatic selection any more?
2. If not then is there a way of displaying a loading panel using only client-side code, no postbacks?
Many thanks in advance,
Rob