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

Error on 'JavaScript runtime error: Unable to get property 'fireCommand' of undefined or null reference' for Client side binding radgrid

1 Answer 244 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dhamodharan
Top achievements
Rank 1
Dhamodharan asked on 19 Sep 2013, 07:16 AM
Hi,
  I am using a clientside binding radgrid. i have assigned a button column with a command name. when i click on it i get the following error.
'JavaScript runtime error: Unable to get property 'fireCommand' of undefined or null reference'






Thanks





1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 24 Sep 2013, 05:59 AM
Hi Dhamodharan,

Please note that when client-side binding is used and a CommandName is assigned to a given GridButtonColumn you should subscribe to the OnCommand event of RadGrid and cancel the postback:
function OnGridCommand(sender,args) {
           if (args.get_commandName() == "Edit") {
               //Execute some logic here
               args.set_cancel(true);
           }
       }

The idea when using such type of binding is to handle things solely on the client. Since I am not familiar with the exact scenario I would like to ask you to show us the markup and code-behind of the grid page. This would be of great help as we will be able to investigate further what is causing the problem on hand.

Regards,
Angel Petrov
Telerik
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 the blog feed now.
Tags
Grid
Asked by
Dhamodharan
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or