User Profile & Activity

Raviraj Shimpi Member
Posted: March 26, 2010 8:46 AM

Thanks a lot for ur replay

Posted: March 19, 2010 6:11 AM

hi m still getting same error

 

here is my code which have written to get treeview

 

protected void WebTreeView1_InitializeChildNodes(object sender, WebTreeViewNodeEventArgs e)
        {
            GetTreeNode(e.Node);
        }

        protected void GetTreeNode(WebTreeViewNode Tree)
        {
            DataSet State = objLibrary.FillDS("ssp_GetDisplayTblStateMasterForWebGrid", "12");
            DataSet City = objLibrary.FillDS("ssp_GetDisplayTblDistrictMasterForWebGrid", "12");

            WebTreeViewNode StateNode = new WebTreeViewNode();
            WebTreeViewNode CityNode = new WebTreeViewNode();
            Tree.Expanded = true;
            for (int i = 0; i < State.Tables[0].Rows.Count; i++)
            {
                Tree.Nodes.Add(GetTreeNode(State.Tables[0].Rows[i], "S-"));

                DataTable FilterCity = GetDataView(City.Tables[0], State.Tables[0].Rows[i]["intStateId"].ToString());
               
                for (int j = 0; j < FilterCity.Rows.Count; j++)
                {
                    StateNode.Nodes.Add(GetTreeNode(State.Tables[0].Rows[i], "C-"));
                }
            }
            WebTreeView1.Nodes.Add(Tree);
        }

        public WebTreeViewNode GetTreeNode(DataRow row, string Value)
        {
            WebTreeViewNode NewNode;
            NewNode = new WebTreeViewNode(row[0].ToString());
            NewNode.Text = row[1].ToString();
            NewNode.Value = Value + row[0].ToString();
            NewNode.ToolTip = row[1].ToString();
            return NewNode;
        }

        public DataTable GetDataView(DataTable row, string Value)
        {
            DataView dv = new DataView(row);
            dv.RowFilter = "" + row.Columns[4].ColumnName + "=" + Value + "";
            return dv.ToTable();
        }

Posted: March 15, 2010 8:22 AM

hi if u are using UpdatePanel just remove it from ur source, perhaps it will solve ur problem..

Posted: March 15, 2010 3:39 AM

its okay have solved my problem thanks for replay

 

All times are GMT -5. The time now is 10:51 AM.
Previous Next