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

prevent radpanelbar from refresh

3 Answers 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 16 May 2013, 04:05 AM
hi all,

i have a radpanelbar bind with datasource during pageload. when i click on the item, the screen auto refresh again.

how do i prevent the page from reload/refresh after clicked?

appreciate any inputs. thanks!

regards,

Richard

3 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 20 May 2013, 08:41 AM
Hi Richard,

Thank you for contacting us.

In general a clicking of the RadPanelItem should not cause a postback of the page unless you attach the OnItemClick server side event. Can you please provide more details on your scenario or a very simplified runnable page so I can get the behavior that you have from my side? Thus I can inspect it locally and help you out in the most effective way.  

Thank you in advance for your cooperation.

Kind regards,
Kate
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.
0
Sandy
Top achievements
Rank 1
answered on 04 Dec 2015, 08:29 AM

Hi Kate,

Even I am having the same issue, where rad panel bar has "OnItemClick" server side event.Is there any way to stop the post back on it item click.Please help on this.

 

Regard,

Sandhya.

0
Ivan Danchev
Telerik team
answered on 09 Dec 2015, 07:31 AM
Hello Sandhya,

If you don't want clicking on the PanelBar's items to initiate a postback do not subscribe to the server-side OnItemClick event. You can subscribe to the OnClientItemClicking and OnClientItemClicked client-side events:
<script type="text/javascript">
    function OnClientItemClicked(sender, args) {
 
    }
 
    function OnClientItemClicking(sender, args) {
 
    }
</script>
<div>
    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" OnClientItemClicked="OnClientItemClicked" OnClientItemClicking="OnClientItemClicking">
        <Items>
            <telerik:RadPanelItem Text="Item1" Value="1">
                <Items>
                    <telerik:RadPanelItem Text="Child1" Value="c1"></telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>
            <telerik:RadPanelItem Text="Item2" Value="2">
            </telerik:RadPanelItem>
            <telerik:RadPanelItem Text="Item3" Value="3">
            </telerik:RadPanelItem>
        </Items>
    </telerik:RadPanelBar>
</div>


Regards,
Ivan Danchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Richard
Top achievements
Rank 1
Answers by
Kate
Telerik team
Sandy
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or