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

Handle clientside event AddNewRecord Button

2 Answers 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Datamex
Top achievements
Rank 2
Datamex asked on 16 Sep 2009, 11:40 AM
Hi,

We are using the Radgrid with the standard commanditemdisplay on top.
Is there a clientside event to handle the "AddNewRecord" button click so we can add our own functionality to this button?

greetings Datamex.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 16 Sep 2009, 12:53 PM
Hello,

Try attaching the OnCommand event for RadGrid, then check for the CommandName in the event whether it is "InitInsert" as shown below.

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

JavaScript:
 
<script type="text/javascript"
function OnCommand(sender, args) 
{     
    if(args.get_commandName() == 'InitInsert'
    { 
        // Your code 
    } 

-Shinu.
0
Datamex
Top achievements
Rank 2
answered on 16 Sep 2009, 01:08 PM
Thank you,

This is exactly what i was looking for :) !
Tags
Grid
Asked by
Datamex
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Datamex
Top achievements
Rank 2
Share this question
or