I think Pnima's solution assumes that you pass your node ID as parameter to your page's querystring.Is this what you had in mind, or else, what did you mean by "find the Parent Node id" by itself? Use the current page ID as parent Id?
What if i want a Link Button on top of the Gridview when the Button is clicked it wil show the create Content Popup when u create content document under a root node That screen to show cos i dotn want to programatically create docuements and give it name programatically..
I use this code But i want to databind a Document Property example "Name" in the Gridview it does not work any idea how i can Databind a Document property of teh child nodes in The Gridview
work with gridview and user control in umbraco 4.5.2
Hi
I have some child node. Now i want to show my child node in grid view using user control.
Can any one help me what are syntex of gridview in user control for child node.
Touhid
Have a look at NodeFactory:
http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-the-nodefactory
From memory you can set the Gridview source to:
Aternatively look into Linq2Umbraco.
Hi
I have used a gridview in asp.net design side, which is:
And my user control cs code is :
Here, 1243 is parent node id, but it has some child node. So how can i get the all child node value using cs code.
Above the asp.net code the vesselName, position, date and dir are child node page field. i want show then in different textbox.
pls help me.
Touhid
for a Gridview you'd want to do:
var node = new Node(1243);
var childern = node.ChildrenAsTable();
GridView1.DataSource = children;
Gridview1.DataBind();
yeh, I want to show all of child node value using gridview.
what if i dont want to use 1243 or any node id i want the control to fid the Parent NodeIt by itself is that possible
Hi max
If you want to get the id of selected node then you can use Request.QueryString["Id"]. From this id you can get the parent node of selected node too.
Thanks
Pnima
Hi Max,
I think Pnima's solution assumes that you pass your node ID as parameter to your page's querystring.Is this what you had in mind, or else, what did you mean by "find the Parent Node id" by itself? Use the current page ID as parent Id?
Cheers,
Michael.
What if i want a Link Button on top of the Gridview when the Button is clicked it wil show the create Content Popup when u create content document under a root node That screen to show cos i dotn want to programatically create docuements and give it name programatically..
User user = User.GetUser(0);
Node node = new Node(Convert.ToInt32(Request.QueryString["id"]));
DataTable dt = node.ChildrenAsTable();
this.GridView1.DataSource = dt;
this.GridView1.DataBind();
I use this code But i want to databind a Document Property example "Name" in the Gridview it does not work any idea how i can Databind a Document property of teh child nodes in The Gridview
is working on a reply...