ItemCommand on PreRender

4 posts, 1 answers
  1. Craig Mellon
    Craig Mellon avatar
    53 posts
    Member since:
    May 2005

    Posted 24 Jan 2012 Link to this post

    I have an ItemCommand for my grid which is "RowClick", which updates a group of labels via ajax when a row is clicked.

    On the PreRender event of the grid I am selecting the first row on page load, how can I fire off the "RowClick" ItemCommand?

    Thanks,
  2. Craig Mellon
    Craig Mellon avatar
    53 posts
    Member since:
    May 2005

    Posted 24 Jan 2012 Link to this post

    Anyone?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Marin
    Admin
    Marin avatar
    1043 posts

    Posted 25 Jan 2012 Link to this post

    Hi Craig,

     You can try the following code on the server:

    RadGrid1.Items[0].FireCommandEvent("commandName", "commandArgument");
    This will fire a command for the first row in the grid.Regards,
    Marin
    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
  5. Craig Mellon
    Craig Mellon avatar
    53 posts
    Member since:
    May 2005

    Posted 25 Jan 2012 Link to this post

    Perfect!

    Thank you.
Back to Top