in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

Error for ProcessDragNode

Last post 8/18/2008 10:03 AM by Bruno Pacola. 4 replies.
Page 1 of 1 (5 items)
Sort Posts:
Previous Next
  • 8/15/2008 9:49 AM

    Error for ProcessDragNode

    Hi...

    I try ASPxTreeList and I have problem..


    I test Drag in Drop....


    see:

            protected void ASPxTreeList_ProcessDragNode(object sender, DevExpress.Web.ASPxTreeList.TreeListNodeDragEventArgs e)
            {
                ASPxTreeList.MoveNode(e.Node.Key, e.NewParentNode.Key);
            }

     

    and...

     

    <dxwtl:ASPxTreeList ID="ASPxTreeList" runat="server"
                CssFilePath="~/App_Themes/Youthful/{0}/styles.css" CssPostfix="Youthful"
                Width="1000px" KeyFieldName="IDLOTACAO" ParentFieldName="LOTACAOSUPERIOR"
                PreviewFieldName="DESCRICAOLOTACAO" AutoGenerateColumns="False"
                onprocessdragnode="ASPxTreeList_ProcessDragNode">
                <Styles CssFilePath="~/App_Themes/Youthful/{0}/styles.css"
                    CssPostfix="Youthful">
                </Styles>
                <Images ImageFolder="~/App_Themes/Youthful/{0}/">
                    <CollapsedButton Height="9px"
                        Url="~/App_Themes/Youthful/TreeList/CollapsedButton.png" Width="9px" />
                    <ExpandedButton Height="9px"
                        Url="~/App_Themes/Youthful/TreeList/ExpandedButton.png" Width="9px" />
                    <CustomizationWindowClose Height="13px" Width="13px" />
                </Images>
                <SettingsText LoadingPanelText="Aguarde..." />
                <SettingsLoadingPanel Text="Aguarde..." />
                <SettingsPager>
                    <AllButton>
                        <Image Height="15px" Width="21px" />
                    </AllButton>
                    <FirstPageButton>
                        <Image Height="15px" Width="21px" />
                    </FirstPageButton>
                    <LastPageButton>
                        <Image Height="15px" Width="21px" />
                    </LastPageButton>
                    <NextPageButton>
                        <Image Height="15px" Width="16px" />
                    </NextPageButton>
                    <PrevPageButton>
                        <Image Height="15px" Width="16px" />
                    </PrevPageButton>
                </SettingsPager>
                <SettingsEditing AllowNodeDragDrop="True" />
                <Columns>
                    <dxwtl:TreeListTextColumn Caption="Descrição da Lotação"
                        FieldName="DESCRICAOLOTACAO" Name="DESCRICAOLOTACAO" ReadOnly="True"
                        VisibleIndex="0">
                    </dxwtl:TreeListTextColumn>
                </Columns>
            </dxwtl:ASPxTreeList>

     

    But the message error when i "drag in drop" this...

    An unhandled exception of type 'System.StackOverflowException' occurred in DevExpress.Web.ASPxTreeList.v8.2.dll

     

  • 8/15/2008 10:21 AM In reply to

    Re: Error for ProcessDragNode

    Hi,

     

    It is required that you implement a custom node moving logic in the ProcessDragNode event handler.
    By calling the MoveNode method, the event is raised again, and as a result, you get a stack overflow.

     

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 8/15/2008 10:54 AM In reply to

    Re: Error for ProcessDragNode

    Thanks Friend!

    But I need more information...

     

    For move node is required  ASPxClientTreeList.StartDragNode AND ASPxClientTreeList.EndDragNode?

    Now..other question is great...hehe What code I use in ASPxClientTreeList.StartDragNode AND ASPxClientTreeList.EndDragNode?

    I using ProcessDragNode for update my datatable...

  • 8/15/2008 11:08 AM In reply to

    Re: Error for ProcessDragNode

    No, these events (StartDragNode and EndDragNode) are not required.

     

    Thanks, Alexey M
    R&D, .NET Team
    Developer Express Inc.

    PS. If you wish to receive direct assistance from our Support Team, use Support Center at http://www.devexpress.com/Support/Center
  • 8/18/2008 10:03 AM In reply to

    Re: Error for ProcessDragNode

    Hi Friend!

    I have other problem... =)

    Message diolog about "don`t support method" finished! But when move node, this node disappears.


    See my code:

            <dxwtl:ASPxTreeList ID="ASPxTreeList" runat="server"
                CssFilePath="~/App_Themes/Youthful/{0}/styles.css" CssPostfix="Youthful"
                Width="350px" KeyFieldName="CodigoAtividade"
                ParentFieldName="CodigoAtividadePai" AutoGenerateColumns="False"
                onprocessdragnode="ASPxTreeList_ProcessDragNode">
                <Styles CssFilePath="~/App_Themes/Youthful/{0}/styles.css"
                    CssPostfix="Youthful">
                </Styles>
                <Images ImageFolder="~/App_Themes/Youthful/{0}/">
                    <CollapsedButton Height="9px"
                        Url="~/App_Themes/Youthful/TreeList/CollapsedButton.png" Width="9px" />
                    <ExpandedButton Height="9px"
                        Url="~/App_Themes/Youthful/TreeList/ExpandedButton.png" Width="9px" />
                    <CustomizationWindowClose Height="13px" Width="13px" />
                </Images>
                <SettingsText LoadingPanelText="Aguarde..." />
                <SettingsLoadingPanel Text="Aguarde..." />
                <SettingsPager>
                    <AllButton>
                        <Image Height="15px" Width="21px" />
                    </AllButton>
                    <FirstPageButton>
                        <Image Height="15px" Width="21px" />
                    </FirstPageButton>
                    <LastPageButton>
                        <Image Height="15px" Width="21px" />
                    </LastPageButton>
                    <NextPageButton>
                        <Image Height="15px" Width="16px" />
                    </NextPageButton>
                    <PrevPageButton>
                        <Image Height="15px" Width="16px" />
                    </PrevPageButton>
                </SettingsPager>
                <SettingsEditing AllowNodeDragDrop="True" />
                <Columns>
                    <dxwtl:TreeListTextColumn Caption="Atividade"
                        FieldName="Atividade" Name="Atividade" ReadOnly="True"
                        VisibleIndex="0" Width="300px">
                    </dxwtl:TreeListTextColumn>
                    <dxwtl:TreeListCheckColumn Caption="Status" FieldName="Status" Name="Status"
                        VisibleIndex="1" Width="50px">
                    </dxwtl:TreeListCheckColumn>
                </Columns>
            </dxwtl:ASPxTreeList>

     

            protected void ASPxTreeList_ProcessDragNode(object sender, DevExpress.Web.ASPxTreeList.TreeListNodeDragEventArgs e)
            {

                LotacaoDataSet.AtividadesDataTable dt = new LotacaoDataSet.AtividadesDataTable();

                LotacaoDataSet.AtividadesRow[ atividadesRows = (LotacaoDataSet.AtividadesRow[)Atividades.Select("CodigoAtividade = " + e.Node.Key);
                if (atividadesRows.Length == 0) return;
                dt = Atividades;
                dt.RemoveAtividadesRow(atividadesRows[0]);

                if (string.IsNullOrEmpty(e.NewParentNode.Key))
                    atividadesRows[0].SetCodigoAtividadePaiNull();
                else
                    atividadesRows[0].CodigoAtividade = int.Parse(e.NewParentNode.Key);

                dt.ImportRow(atividadesRows[0]);
                Atividades = dt;


                e.Handled = true;

               
                ASPxTreeList.DataSource = Atividades;
                ASPxTreeList.DataBind();

            }

     

     

Page 1 of 1 (5 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED