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

Rebind: what am I doing wrong?

2 Answers 79 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Jorge
Top achievements
Rank 1
Jorge asked on 24 May 2010, 05:29 PM
I have a listview. Inside every item I have a RadToolbar that, when clicked, shows a hidden panel inside the item.
When clicking a button in that hidden panel, and after modifying some data in the database, I need to fire a rebind, but when i execute listview1.Rebind() (in server-side) I get "Exception has been thrown by the target of an invocation".

Any ideas?
Thanks a lot!


2 Answers, 1 is accepted

Sort by
0
BaiH
Top achievements
Rank 1
answered on 27 May 2010, 01:08 PM
Maybe you can share the page's code with us? Don't forget to use format code block button.

And what's the exact exception you are getting (disabling the ajax will help to see a more detailed message)?

--BH
0
Jorge
Top achievements
Rank 1
answered on 28 May 2010, 02:00 PM
When I call Rebind() the application waits 10 seconds (aprox) and they I get a "Target thrown exception".
I fixed it with client javascript script, sending

radAjaxManager.ResponseScripts.Add("lbRegistrosRebind()"); 


where lbRegistrosRebind is
 
 function lbRegistrosRebind() { 
            var listView = $find("<%= lvRegistros.ClientID %>"); 
            listView.rebind(); 
        } 

Tags
ListView
Asked by
Jorge
Top achievements
Rank 1
Answers by
BaiH
Top achievements
Rank 1
Jorge
Top achievements
Rank 1
Share this question
or