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

RadGrid ItemCommand not working

4 Answers 265 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 06 Jan 2012, 01:12 AM
Hello, 

I have a column 

 <telerik:GridButtonColumn CommandName="SELECT" Text="SELECT" 
                        UniqueName="Select" >
 </telerik:GridButtonColumn>

in a radgrid, and I have the radgrid property 

onitemcommand="ItemCommand"

But when the button is clicked the event does not fire. Any ideas? I am on a deadline fast coming and this has stopped me in my tracks

All I could find in my searches is that I need to enable viewstate, but that has had no effect. 

4 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 06 Jan 2012, 01:17 AM
Naturally after I make a post I figure it out... 

I put a breakpoint in the method that handles the event, I had the line 

  if (e.CommandName == "SELECT") 

when I inspected e.CommandName it was showing me "Select" not "SELECT". I was expecting SELECT as that is what I set as the command name in the control. 
0
Michael
Top achievements
Rank 1
answered on 06 Jan 2012, 01:47 AM
Now my issue is that with the latest version of RadGrid, Response.Redirect is not working in that command.


I tried RadGrid1.AsyncRedirect but that method does not exist
0
Andrey
Telerik team
answered on 06 Jan 2012, 06:09 PM
Hello Michael,

Are you using Ajax? If you are using you could check this help topic and this online thread for more information on the matter.

If you are not using Ajax, could you post the RadGrid declaration with the corresponding event handler methods?

Kind regards,
Andrey
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
0
Michael
Top achievements
Rank 1
answered on 06 Jan 2012, 06:34 PM
I did not know about 

RadAjaxManager1.Redirect

Looks like that will do the trick!

Thank you
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Andrey
Telerik team
Share this question
or