Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
bind data
posted

hi , i have a problem withe binding data to a UltraWebTree, i use a datatable as datasource, but when i execute the aplicaton i can`t see the webtree, here some code:

this is the webtree:

<ignav:UltraWebTree ID="uwtAreas" runat="server" DefaultImage="" ExpandOnClick="True"

                        HoverClass="" Indentation="20" LoadOnDemand="Automatic" LoadOnDemandPrompt="<b>Cargando...</b>"

                        OnNodeClicked="uwtAreas_NodeClicked" Width="110px" AutoPostBack="True" DataMember="datos" MaxDataBindDepth="3">

                        <Levels>

                            <ignav:Level Index="0" ColumnName="NOMBREAREA" LevelKeyField="CODIGOAREA" />

                            <ignav:Level Index="1" ColumnName="NOMBRETIPO" LevelKeyField="CODIGOTIPO" />

                            <ignav:Level Index="2" />

                        </Levels>

                    </ignav:UltraWebTree>

 

this is in the code behind:

 protected void Page_Load(object sender, EventArgs e)

    {

        if (!Page.IsPostBack)

        {

            uwtAreas.DataSource = presentacion.NodosPorMostrar; (returns a datatable)

            uwtAreas.Levels[0].LevelKeyField = "CODIGOAREA";

            uwtAreas.Levels[0].ColumnName = "NOMBREAREA";

            uwtAreas.Levels[1].LevelKeyField = "CODIGOTIPO";

            uwtAreas.Levels[1].ColumnName = "NOMBRETIPO";

            uwtAreas.DataBind();

 }