Handle clientside event AddNewRecord Button

3 posts, 1 answers
  1. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 16 Sep 2009 Link to this post

    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. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Sep 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 16 Sep 2009 Link to this post

    Thank you,

    This is exactly what i was looking for :) !
Back to Top