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

RadPanelGrid requires no postback

1 Answer 35 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Jon Procter
Top achievements
Rank 1
Jon Procter asked on 09 Jun 2010, 11:14 AM
I have a RadPanelGrid that I dynamically add RadPanelItems from the runtime Page Load. On these RadPanelItems are RadGrids which are also dynamically populated from the original page load. Whenever I click on any RadPanelItem which has a grid on it, I want the item to simply expand and display the grid. It is currently doing this, but then firing a postback which calls the page load again. This means that the "dynamic grid adding code" in the Page load happens EVERY time a click happens (rather than just once when the page loaded), otherwise when I click on a RadPanelItem, it expands, posts back, and my grids disappear.

With my current solution, just clicking on an item causes it to expand, postback, and have the grid re-added, when in reality, if there were no postback, this "grid adding code" would not need to be run every time. How do I switch off postbacks for dynamically added rad panel items? I have tried it at runtime, but it doesn't work, and the documentation does support this fact that it should NOT work, so how should I do it then?

I am already harnessing the client side "OnClientItemClicked" event, as I need to do some client side activity when an item is clicked. I do not however want it to post back server side really, as I already have my grids and display complete, and do not need to. I have read some previous threads suggesting that a: 

e.set_cancel(true);


in the client side function is the way to prevent a server side postback, but it doesn't like "set_cancel" as a property of the event args, and is subsequently giving me a: "Object doesn't support this property or method".

The RadPanelBar is on the form at design time, so if there is a property on there that I can set to stop it doing any postbacks then great, otherwise, it will either need to be a property on the runtime added items, or potentially a "slight hack" in the client side script, to prevent the post back after the click. Any solution suits really, but this continual server side post back is having a huge performace hit on the app, so I need to get it ceased. Any help would be greatly appreciated.

  

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 10 Jun 2010, 01:44 PM
Hello Jon Procter,

Please open a support ticket and send us a simple project reproducing your issue.
This is the best way for us to help you!

Thanks!


Regards,
Nikolay Tsenkov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
PanelBar
Asked by
Jon Procter
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or