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

How to run a javascript function when RadGrid control is loaded?

1 Answer 699 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pooya
Top achievements
Rank 1
Pooya asked on 05 Apr 2011, 11:48 AM
I have a javascript function as below:
 function run() {
        alert('run');
    }

I have a RadGrid control which is updated using RadAjaxManager. How could I run that javascript when the RadGrid is updated? I had hoped to see a OnClientLoad event on this control but there is none. Any help?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Apr 2011, 01:00 PM
Hello Pooya,

You can attach 'OnGridCreated' client event to achive this.

ASPX:
<ClientSettings>
    <ClientEvents OnGridCreated="OnGridCreated" />
</ClientSettings>

Java Script:
<script type="text/javascript">
     function OnGridCreated(sender, args) {
        alert("run");
    }
</script>

Thanks,
Princy.
Tags
Grid
Asked by
Pooya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or