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

RadDockingZone1.Controls.Clear() is not working.

3 Answers 97 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Animesh Dey
Top achievements
Rank 2
Animesh Dey asked on 12 Apr 2010, 02:15 PM
hi,
I m developing a project with classical Rad Controls. I got problem when i m working with RadDocking object. 

Scenario:
1. Load Parent Node first to radDocking objects
2. Load Child to the same RadDockingZone when any parent id click.

I can load Parent node first having no problem. But when i try to load children of that parent, RadDockingZone is not clear and no children is viewed. 

<form id="form1" runat="server">
        <div>
            <cc1:RadDockingManager ID="RadDockingManager1" runat="server" />
            <cc1:RadDockingZone ID="RadDockingZone1" runat="server" Width="100%" Height="100%"
                DockEnabled="true" Type="Horizontal">
                </cc1:RadDockingZone>
        </div>
        
        <script type="text/javascript">
        function LoadRelatedDiscipline(ParentID)
        {
            var ajaxManager = <%= RadAjaxManagerDefault.ClientID %> 
            ajaxManager.AjaxRequest(ParentID); 
        }
        </script>
        
        <radW:RadWindowManager ID="RadWindowManager2" runat="server" Skin="Office2007" Behavior="None"
            VisibleStatusbar="false" UseEmbeddedScripts="false">
        </radW:RadWindowManager>
        <radA:RadAjaxManager ID="RadAjaxManagerDefault" runat="server" DefaultLoadingPanelID="AjaxLoadingPanel1"
            OnAjaxRequest="RadAjaxManagerDefault_AjaxRequest" UseEmbeddedScripts="False">
        </radA:RadAjaxManager>
        <radA:AjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="75px" Transparency="10"
            Width="75px">
            <asp:Image ID="Image1" runat="server" AlternateText="Loading..." BackColor="Transparent"
                ImageUrl="~/RadControls/Ajax/Skins/Default/loading.gif" />
        </radA:AjaxLoadingPanel>
    </form>



protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.LoadDockObjects(null);           
        }
    } 

private void LoadDockObjects(int? parentId)
    {
DataTable dt = new DataTable();
if( parentID == null)
{
dt = LoadAllParents();
else
{
LoadChildrent(parentId);
}       

        foreach (DataRow oRow in dt.Rows)
        {
            RadDockableObject obj = new RadDockableObject();
            obj.ID = string.Format("ID{0}", oRow["ID_NUM"]);
            obj.Text = oRow["DETAIL"].ToString();
            obj.DockingMode = RadDockingModeFlags.AlwaysDock;
            obj.Width = Unit.Pixel(600);
            obj.Height = Unit.Pixel(300);

            Oracle_ControlLibrary_ucRD2l customControl = (Oracle_ControlLibrary_ucRD2l)LoadControl("~/Oracle/ControlLibrary/ucRD2l.ascx");
            customControl.PatientKey = patientKey;
            customControl.DisCode = oRow["ID_NUM"].ToString();

            obj.Container.Controls.Add(customControl);
            RadDockingZone1.Controls.Add(obj);

            this.VisitedRDHandler(oRow["DETAIL"].ToString());
        }
    }

protected void RadAjaxManagerDefault_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        if (e.Argument != string.Empty)
        {
            int? patientId = Convert.ToInt32( e.Argument);
            this. LoadDockObjects(patientId);
        }
    } 



I did not find any solution of that problem. Please help....

3 Answers, 1 is accepted

Sort by
0
Animesh Dey
Top achievements
Rank 2
answered on 12 Apr 2010, 03:08 PM
Hi,
I solve that problem by modifying RadAjaxManager Setting. 
Solution:
<radA:RadAjaxManager ID="RadAjaxManagerDefault" runat="server" DefaultLoadingPanelID="AjaxLoadingPanel1"
            OnAjaxRequest="RadAjaxManagerDefault_AjaxRequest" UseEmbeddedScripts="False">
            <AjaxSettings>
            <radA:AjaxSetting AjaxControlID="RadAjaxManagerDefault">
                <UpdatedControls>
                    <radA:AjaxUpdatedControl ControlID="RadDockingManager1" />
                    <radA:AjaxUpdatedControl ControlID="RadDockingZone1" />
                </UpdatedControls>
            </radA:AjaxSetting>
        </AjaxSettings>
        </radA:RadAjaxManager>

But faced new problem.

Problem: 
My DockObject Contain a user control which also contain a asp:GridView to view node information. 
First time when the parent node are displayed, its work fine. But got problem when the child information is loaded. 

Those Grid column is viewing empty value which are "TemplateField". 
Is there any solution of that problem??
0
Pero
Telerik team
answered on 14 Apr 2010, 11:22 AM
Hello Animesh,

I am not sure that I fully understand the problem, and it cause. Could you please send a fully working sample project that demonstrates the issue? Once we receive it, we will do our best to help you resolve the issue.
Please note, that you need to open a new support ticket to be able to attach files.


Sincerely yours,
Pero
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.
0
Animesh Dey
Top achievements
Rank 2
answered on 19 Apr 2010, 12:24 PM
Thank a lot for your reply.

Due to my some mistake, it was not working. I find out my mistake and fixed those and all are working fine now..

Animesh Chandra Dey
Tags
General Discussions
Asked by
Animesh Dey
Top achievements
Rank 2
Answers by
Animesh Dey
Top achievements
Rank 2
Pero
Telerik team
Share this question
or