Full postback triggered on clicking command item buttons

2 posts, 1 answers
  1. Adesh
    Adesh avatar
    4 posts
    Member since:
    Jul 2011

    Posted 13 Aug 2013 Link to this post

    Hi,

    I have an issue related to the post back triggered by the command items of radgrid.

    Scenario is I have a web page that contains two rad grids they both have their command item template inside the rad-toolbar.

    both grids have Add, update, delete on their command item templates whose visibility are decided by the no of record chosen from the respective grid.


    Problem - 
    When I click say one command item from radgrid1 than it forces the complete page post-back and due to this the command item visibility 
    on radgrid 2 gets reset .
    So is there any way that both grids should not disturb the each other say command items visibility.

    Please help


    thanks

  2. Answer
    Eyup
    Admin
    Eyup avatar
    3801 posts

    Posted 16 Aug 2013 Link to this post

    Hi Adesh,

    You can modify the visibility of the command item controls in the PreRender event by getting a reference to the command item using the approach demonstrated in the following topic:
    http://www.telerik.com/help/aspnet-ajax/grid-using-getitems-getcolumn-methods.html

    That way, their state will be preserved on every postback to the server.

    Alternatively, you can ajaxify your grids separately so they do not update each other:
    http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

    Hope this helps. Please give it a try and let me know if it works for you.

    Regards,
    Eyup
    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.
Back to Top