views:

617

answers:

3

I have a custom server control that loads data from a web service into a GridView. Works fine on my page. I want to be able to click on a row and pop a popupcontrol with more detail on the clicked row. I am using the client side events of the DevExpress gridview to handle the onclick. And from JavaScript I am calling a callbackpanel to access my custom server control to get properties to use in the popupcontrol. In the callback, the properties on my server control (which were previously set in order to display the data) are not set, yet any of the other standard controls on the page still have their property settings. Am I missing a setting in my customer server control that will persist my property settings into a callback?

Thanks.

+1  A: 

There are a few methods for persisting values through a postback. The method you pick will depend on your exact situation, which you didn't elaborate enough. Personally, I think it sounds like a good place for AJAX...

Here's a great article with some options: http://msdn.microsoft.com/en-us/magazine/cc300437.aspx

Jasmine
+1  A: 

I've had very similar issues. The problem seemed to resolved by tweaking the timing of when the Data is bound.

Greg Ogle
A: 

Jasmine: I am using vs2008 with .net 3.5 framework. Do I need to add the ViewState[] to my properties or should I be using Control State?

Oglester: What do you mean by 'tweaking the timing of when the Data is bound'?

Mike