ButtonType="ImageButton" and var rowNo = args.get_commandArgument() ;

2 posts, 0 answers
  1. Krzysztof
    Krzysztof avatar
    29 posts
    Member since:
    Aug 2008

    Posted 23 Nov 2008 Link to this post

    Hi

    When I set in grid :

    <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete"  ImageUrl="img/Delete16.gif"                                                    ButtonType="ImageButton"
    CommandName="Delete"  >
    <ItemStyle Width="20px" />
    </telerik:GridButtonColumn>

    <ClientSettings EnableRowHoverStyle="True" AllowRowsDragDrop="True" >
     <ClientEvents OnCommand="Test" />
    </ClientSettings>

    ... and I call Test like :

    function Test(sender, args)

     var command = args.get_commandName();
     if (command == "Delete")
     { 
      var rowNo = args.get_commandArgument() ;
      alert(rowNo);
    }
    I cannot get row number.

    But if I set :

    <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete"     
    CommandName="Delete"  >
    <ItemStyle Width="20px" />
    </telerik:GridButtonColumn>

    <ClientSettings EnableRowHoverStyle="True" AllowRowsDragDrop="True" >
     <ClientEvents OnCommand="Test" />
    </ClientSettings>

    without ImageButton style, everything works good and I can get row number. Why ??

    Regards
    Krzysztof
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 24 Nov 2008 Link to this post

    Hi Krzysztof,

    Unfortunately you are right. We fixed this immediately and the fix will be part of our first service pack (middle of this week).

    I've added 1000 Telerik points to your account.

    Sincerely yours,
    Vlad
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top