This is my code.......
NodeEnumerator myEnumerator = new NodeEnumerator(this.UltraWebTree1);
string s = string.Empty;
string s1 = string.Empty;
while (myEnumerator.MoveNext())
{
s += myEnumerator.Current.Text + ": Level: "
+ myEnumerator.Current.Level.ToString() + "
" + myEnumerator.Current.TargetUrl + "
" ;
Response.Write(s);
}
I am getting values from ultrawebtree and shows the values in aspx page....but i want to show the values in gridview...please give me the source code.....
Loading
Suthish NairPosted Dec 16, 2010, 5:59 AM
Shanmugam GkPosted Dec 15, 2010, 11:58 PM
this is my code for that....
NodeEnumerator myEnumerator = new NodeEnumerator(this.UltraWebTree1);
string s = string.Empty;
string s1 = string.Empty;
while (myEnumerator.MoveNext())
{
//s += myEnumerator.Current.Text + ": Level: "
// + myEnumerator.Current.Level.ToString() + "
" + myEnumerator.Current.TargetUrl + "
" ;
s = myEnumerator.Current.Text;
s1 = myEnumerator.Current.TargetFrame;
}
//Response.Write(s);
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("TargetUrl");
DataRow dr = dt.NewRow();
dr["Name"] = s;
dr["TargetUrl"] = s1;
dt.Rows.Add(dr);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
GridView1.DataSource = ds;
GridView1.DataBind();
}
but it shows the last value of ultrawebtree....it is not bind all the values...how can i do this...give me the solution...
Suthish NairPosted Dec 15, 2010, 12:07 PM