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:
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.