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

add_command client method doesn't works

3 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yura Top
Top achievements
Rank 1
Yura Top asked on 23 Aug 2011, 04:14 PM
Hi
I think that I've found bug in RadGrid.
When I wrote such code:

var radGrid = $find("RadGrid1"));
radGrid.add_command(function (sender, args) {
                        alert("script command handler"); 
                    });

I never saw alert window.
But after I've added on the server side:
        <ClientSettings>
            <ClientEvents OnCommand="function() {  alert("script command handler 2");  }" />
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        </ClientSettings>

I saw 2 alerts.
So, now I live on server side:
<ClientEvents OnCommand="function() { }" />
And client handler works

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 26 Aug 2011, 09:57 AM
Hello Yura,

I followed your steps and was able to replicate the issue. I have forwarded it to our developers for further investigation.

Greetings,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Oleksiy Kravchuk
Top achievements
Rank 1
answered on 21 Oct 2011, 02:26 PM
Dear all,

I've met the same problem.
Does Telerik have a solution for this issue now?
The same problem for "add_hierarchyExpanded" method.

Thanks,
Oleksiy
0
Iana Tsolova
Telerik team
answered on 25 Oct 2011, 02:01 PM
Hello Oleksiy,

Does it work if you attach the handler through the grid declaration? Note that the event is fired only in case of Client HierarchyLoadMode.

All the best,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Yura Top
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Oleksiy Kravchuk
Top achievements
Rank 1
Share this question
or