This is a migrated thread and some comments may be shown as answers.

Disable Grid postback on DetailTable button click?

1 Answer 238 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raulis
Top achievements
Rank 1
Raulis asked on 01 Nov 2016, 08:59 AM
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?

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 04 Nov 2016, 07:49 AM
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.
Tags
Grid
Asked by
Raulis
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or