Disable Grid postback on DetailTable button click?

2 posts, 0 answers
  1. Raulis
    Raulis avatar
    14 posts
    Member since:
    Jun 2016

    Posted 01 Nov Link to this post

    I came across a performance issue with the RadGrid. I dynamically create buttons for every row in the grid when they are expanded. Every buttons opens up a modal and it doesn't use any information from the grid. My issue is that postback happens and the whole grid is reloaded, even though I add the buttons to RadAjax manager programatically on ItemDataBound and assign them to only update the modal Panel. Has anyone encountered something similar to this? This is hindering my applications performance greatly. Any advice?
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 04 Nov Link to this post

    Hello Raulis,

    If you need the button to execute only client-side logic you can prevent them from initiating a postback. Then you can use JavaScript to open the modal window.

    The markup for a button would be similar to the following:


    <asp:Button Text="Click" ID="Button1" OnClientClick="openPopup(); return false;" runat="server" />

    Give the approach a try and let me know how it works for you. In case the behavior persists please send the markup of RadGrid with the relevant code-behind so we can examine it.

    Regards,
    Viktor Tachev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top