This is a migrated thread and some comments may be shown as answers.

data binding client and selected row

1 Answer 45 Views
This is a migrated thread and some comments may be shown as answers.
Luigi Palumbo
Top achievements
Rank 1
Luigi Palumbo asked on 12 Apr 2010, 05:56 PM

I have a RADGRID with a DATABIND client-side.
The databind event is raised with a JS SETTIMEOUT function:
setTimeout('bindGrid()', 5000);

and in a bindGrid I have a regular call to my web service:
WS.GetDocumentsSelected(startIndex, pageSize, sortField, sortOrder, filtroT, filtroM, mozione, updateGrid, koMessage);

where filtroT, filtroM, mozione are a custom filter.
The return of WS is a below code

function updateGrid(result) {   
        var tableView = $find("<%=RadGrid1.ClientID %>").get_masterTableView();   

It's work fine, but I have a problem with selected row:

If I selected the second row, e.g., and I execute a sort command, my row selected persist in the second row.
The same problem occours with paging-change and a filter changed.

I try to save my selected-row id in hidden-field and in data bound function set the selection manually with the follow code:

function RadGrid1_RowDataBound(sender, args) {  
        var dkvs = document.getElementById("<%=DataKeyValueSelected.ClientID%>");   
        if (dkvs && dkvs.value && (args.get_dataItem()["Id_doc"] == dkvs.value)) {   
        } else {   


after data bound the paging-change and a sort works fine, but if after row selected I remove my filter, I have all alternating item selected (after the selected row - see attached) .....

1 Answer, 1 is accepted

Sort by
Maria Ilieva
Telerik team
answered on 15 Apr 2010, 11:51 AM
Hello Luigi,

Thank you for contacting and for your questions.

I suggest that the problem you are facing could be because of the way you are persisting the selected rows. Please refer to the following help topic which elaborates on this matter.

Let us know if this helps.

Best wishes,
Maria Ilieva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Asked by
Luigi Palumbo
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question