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

RadGrid with Radwindow

4 Answers 180 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ambuj
Top achievements
Rank 1
Ambuj asked on 02 Nov 2011, 10:32 AM
Hi,
I am using Radgrid, I have a colum with the html link upon clicking on that we are opening a radwindow , I have to preserve the rad windows even when the parent Radgrid refreshes ( Postback), I am using asp.net timer control to refresh the grid at a particular interval, as soon as the grid refreshes the windows disappear , Please suggest me how can I preserve the rad window during postback..

Thanks,
Ambuj

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 02 Nov 2011, 10:42 AM
Hello Ambuj,
 
RadWindow's state is not persisted after a postback. Therefore if the window is not recreated after a postback it will disappear. If you want to persist window's state after a postback you could override the save and load of the ViewState and store the properties of the RadWindows there. If you  want to have the window opened on page load and does not disappear after a postback  set its VisibleOnPageLoad property to true.

Thanks,
Shinu.
0
Ambuj
Top achievements
Rank 1
answered on 02 Nov 2011, 11:41 AM
Hi Thanks for the quick response, Can you please tell me any example or any post related to " you want to persist window's state after a postback you could override the save and load of the ViewState and store the properties of the RadWindows there", it would be a great help for me.

Thanks,
Ambuj
0
Ambuj
Top achievements
Rank 1
answered on 07 Nov 2011, 01:00 PM

Hi,
Actually my RadWindow is inside user control and I am trying to access it in parent page like 

Control windowsManager = ctlVariables.FindControl("listPopupManager");
            Control windows = windowsManager.FindControl("variableValue");

but it's not visible always true.
Can you please tell me how can I save the view state of radwindow on the SaveViewState event and again load on LoadViewstate?

it's urgent, please reply ASAP.

Thanks,
Ambuj
0
Ambuj
Top achievements
Rank 1
answered on 08 Nov 2011, 06:02 AM
Hi.

I have tried below code in our application, but it doesn't seems to work,
Please  can you help me out with this, it's urgent.

protected override object SaveViewState()
        {
            Control windowsManager = ctlVariables.FindControl("listPopupManager");
            Control windows = windowsManager.FindControl("variableValue");
            Object basestate =  base.SaveViewState();
            object[] allStates = new object[10];
             
            allStates[0] = windows.Visible;
            return allStates;
        }
 
        protected override void LoadViewState(object savedState)
        {
            if (savedState != null)
            {
                object[] myState = (object[])savedState;
                if (myState[0] != null)
                {
                    string visible = myState[1].ToString();
                }
 
            }
        }
Tags
Grid
Asked by
Ambuj
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ambuj
Top achievements
Rank 1
Share this question
or