Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   TreeView in Web Custom Control (http://www.velocityreviews.com/forums/t293864-treeview-in-web-custom-control.html)

Jonas 05-18-2006 09:42 AM

TreeView in Web Custom Control
 
Hi.
I'm trying to develop a web custom control that uses a programmatically
created treeview.
My problem is that I get an exception when I try to render the control.
With properties do I have to assign to get this working.
Here is some sample code:

namespace WebControlLibrary1
{
[ToolboxData("<{0}:MyControl runat=server></{0}:MyControl>")]
public class MyControl : WebControl
{
protected override void RenderContents(HtmlTextWriter output)
{
XmlDataSource source = new XmlDataSource();
source.Data = GetXmlElement().OuterXml;

TreeView tv = new TreeView();
tv.ID = ClientID + "_TreeView";
tv.ImageSet = TreeViewImageSet.XPFileExplorer;
tv.RenderControl(output);
}

private XmlElement GetXmlElement()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("<Xml><EmptyXml /></Xml>");
return doc.DocumentElement;
}
}
}


Best regards
Jonas Samuelsson


Gaurav Vaish \(EduJini.IN\) 05-19-2006 06:23 PM

Re: TreeView in Web Custom Control
 
What's the exception... the message and the stack trace..

Code looks prety ookie.

--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------




Jonas 05-22-2006 03:05 PM

Re: TreeView in Web Custom Control
 
Hi,
here is the exception info:

System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="System.Web"
StackTrace:
at System.Web.UI.Control.get_SpacerImageUrl()
at
System.Web.UI.WebControls.TreeView.RenderBeginTag( HtmlTextWriter
writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at WebControlLibrary1.MyControl.RenderContents(HtmlTe xtWriter
output) in C:\Work\WebSite1\WebControlLibrary1\MyControl.cs:l ine 27
at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at
System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter
writer)
at
System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter
writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter
output)
at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at
System.Web.UI.HtmlControls.HtmlForm.RenderControl( HtmlTextWriter
writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Gaurav Vaish \(EduJini.IN\) 05-23-2006 05:32 PM

Re: TreeView in Web Custom Control
 
Cryptic only with the exception that SpacerImageUrl is missing.
Provided any value to it?
Or may be something coming out of MyControl.cs

Mail me the relevant code (with aspx) at
gaurav~DOT~vaish[at]gmail~DOT~com... not sure, but probably may be of some
help.

--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://www.edujini.in
-------------------


"Jonas" <jonas.samuelsson@cab.se> wrote in message
news:1148310340.035804.201340@38g2000cwa.googlegro ups.com...
> Hi,
> here is the exception info:
>
> System.NullReferenceException was unhandled by user code
> Message="Object reference not set to an instance of an object."
> Source="System.Web"
> StackTrace:
> at System.Web.UI.Control.get_SpacerImageUrl()
> at
> System.Web.UI.WebControls.TreeView.RenderBeginTag( HtmlTextWriter
> writer)
> at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
> writer)
> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
> writer, ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
> ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
> at WebControlLibrary1.MyControl.RenderContents(HtmlTe xtWriter
> output) in C:\Work\WebSite1\WebControlLibrary1\MyControl.cs:l ine 27
> at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
> writer)
> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
> writer, ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
> ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
> at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
> writer, ICollection children)
> at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
> at
> System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter
> writer)
> at
> System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter
> writer)
> at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter
> output)
> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
> writer, ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
> ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
> at
> System.Web.UI.HtmlControls.HtmlForm.RenderControl( HtmlTextWriter
> writer)
> at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
> writer, ICollection children)
> at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
> at System.Web.UI.Control.Render(HtmlTextWriter writer)
> at System.Web.UI.Page.Render(HtmlTextWriter writer)
> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
> writer, ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
> ControlAdapter adapter)
> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
> at System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>




Prakash V 06-07-2006 12:35 PM

Re: TreeView in Web Custom Control
 
Hi ,
i too got the same problem, i try to render a treecontrol and pass
the html to some other mehthod, it give object set to null exception, i
tried many things but cannot do it, i tried to replace get_spacerImageurl()
but no use. Did anyone have solution for this problem

part of my code is
private string RenderTree()

{


TreeView Tview = new TreeView();

TreeNode tnode = new TreeNode("Node1", "1");

Tview.Nodes.Add(tnode);

Tview.ID = "Tree1";


StringBuilder sb = new StringBuilder();

StringWriter sw = new StringWriter(sb);

HtmlTextWriter htmlTW = new HtmlTextWriter(sw);

Tview.RenderControl(htmlTW);

return sb.ToString();

}

and stack trace is [NullReferenceException: Object reference not set to an
instance of an object.]
System.Web.UI.Control.get_SpacerImageUrl() +50
System.Web.UI.WebControls.TreeView.RenderBeginTag( HtmlTextWriter writer)
+202
System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter writer) +31
System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer,
ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter
adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
TreeviewRender.RenderTree() in
d:\TestProject\TestProject\TreeviewRender.aspx.cs: 30
TreeviewRender.Page_Load(Object sender, EventArgs e) in
d:\TestProject\TestProject\TreeviewRender.aspx.cs: 17
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o,
Object t, EventArgs e) +31
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender,
EventArgs e) +68
System.Web.UI.Control.OnLoad(EventArgs e) +88
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3030







"Gaurav Vaish (EduJini.IN)" <gaurav.vaish.nospam@nospam.gmail.com> wrote in
message news:%237oNj7ofGHA.4464@TK2MSFTNGP04.phx.gbl...
> Cryptic only with the exception that SpacerImageUrl is missing.
> Provided any value to it?
> Or may be something coming out of MyControl.cs
>
> Mail me the relevant code (with aspx) at
> gaurav~DOT~vaish[at]gmail~DOT~com... not sure, but probably may be of some
> help.
>
> --
> Happy Hacking,
> Gaurav Vaish
> http://www.mastergaurav.org
> http://www.edujini.in
> -------------------
>
>
> "Jonas" <jonas.samuelsson@cab.se> wrote in message
> news:1148310340.035804.201340@38g2000cwa.googlegro ups.com...
>> Hi,
>> here is the exception info:
>>
>> System.NullReferenceException was unhandled by user code
>> Message="Object reference not set to an instance of an object."
>> Source="System.Web"
>> StackTrace:
>> at System.Web.UI.Control.get_SpacerImageUrl()
>> at
>> System.Web.UI.WebControls.TreeView.RenderBeginTag( HtmlTextWriter
>> writer)
>> at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
>> writer)
>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>> writer, ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>> ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>> at WebControlLibrary1.MyControl.RenderContents(HtmlTe xtWriter
>> output) in C:\Work\WebSite1\WebControlLibrary1\MyControl.cs:l ine 27
>> at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
>> writer)
>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>> writer, ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>> ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>> at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
>> writer, ICollection children)
>> at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
>> at
>> System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter
>> writer)
>> at
>> System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter
>> writer)
>> at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter
>> output)
>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>> writer, ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>> ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>> at
>> System.Web.UI.HtmlControls.HtmlForm.RenderControl( HtmlTextWriter
>> writer)
>> at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
>> writer, ICollection children)
>> at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
>> at System.Web.UI.Control.Render(HtmlTextWriter writer)
>> at System.Web.UI.Page.Render(HtmlTextWriter writer)
>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>> writer, ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>> ControlAdapter adapter)
>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>> at System.Web.UI.Page.ProcessRequestMain(Boolean
>> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>>

>
>




Gaurav Vaish \(www.EduJini.IN\) 06-11-2006 08:19 AM

Re: TreeView in Web Custom Control
 
I've given a solution to Jonas...
Just set the value of,... grrr... lost the property name, as empty
value.

BRB :)

--
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.org
http://www.edujini.in | http://webservices.edujini.in
-------------------


"Prakash V" <vvprakassh@hotmail.com> wrote in message
news:OIuNc5iiGHA.4044@TK2MSFTNGP03.phx.gbl...
> Hi ,
> i too got the same problem, i try to render a treecontrol and pass
> the html to some other mehthod, it give object set to null exception, i
> tried many things but cannot do it, i tried to replace
> get_spacerImageurl() but no use. Did anyone have solution for this problem
>
> part of my code is
> private string RenderTree()
>
> {
>
>
> TreeView Tview = new TreeView();
>
> TreeNode tnode = new TreeNode("Node1", "1");
>
> Tview.Nodes.Add(tnode);
>
> Tview.ID = "Tree1";
>
>
> StringBuilder sb = new StringBuilder();
>
> StringWriter sw = new StringWriter(sb);
>
> HtmlTextWriter htmlTW = new HtmlTextWriter(sw);
>
> Tview.RenderControl(htmlTW);
>
> return sb.ToString();
>
> }
>
> and stack trace is [NullReferenceException: Object reference not set to an
> instance of an object.]
> System.Web.UI.Control.get_SpacerImageUrl() +50
> System.Web.UI.WebControls.TreeView.RenderBeginTag( HtmlTextWriter writer)
> +202
> System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter writer) +31
> System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer,
> ControlAdapter adapter) +74
> System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
> ControlAdapter adapter) +291
> System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
> TreeviewRender.RenderTree() in
> d:\TestProject\TestProject\TreeviewRender.aspx.cs: 30
> TreeviewRender.Page_Load(Object sender, EventArgs e) in
> d:\TestProject\TestProject\TreeviewRender.aspx.cs: 17
> System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o,
> Object t, EventArgs e) +31
> System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender,
> EventArgs e) +68
> System.Web.UI.Control.OnLoad(EventArgs e) +88
> System.Web.UI.Control.LoadRecursive() +74
> System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3030
>
>
>
>
>
>
>
> "Gaurav Vaish (EduJini.IN)" <gaurav.vaish.nospam@nospam.gmail.com> wrote
> in message news:%237oNj7ofGHA.4464@TK2MSFTNGP04.phx.gbl...
>> Cryptic only with the exception that SpacerImageUrl is missing.
>> Provided any value to it?
>> Or may be something coming out of MyControl.cs
>>
>> Mail me the relevant code (with aspx) at
>> gaurav~DOT~vaish[at]gmail~DOT~com... not sure, but probably may be of
>> some help.
>>
>> --
>> Happy Hacking,
>> Gaurav Vaish
>> http://www.mastergaurav.org
>> http://www.edujini.in
>> -------------------
>>
>>
>> "Jonas" <jonas.samuelsson@cab.se> wrote in message
>> news:1148310340.035804.201340@38g2000cwa.googlegro ups.com...
>>> Hi,
>>> here is the exception info:
>>>
>>> System.NullReferenceException was unhandled by user code
>>> Message="Object reference not set to an instance of an object."
>>> Source="System.Web"
>>> StackTrace:
>>> at System.Web.UI.Control.get_SpacerImageUrl()
>>> at
>>> System.Web.UI.WebControls.TreeView.RenderBeginTag( HtmlTextWriter
>>> writer)
>>> at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
>>> writer)
>>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>>> writer, ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>>> ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>>> at WebControlLibrary1.MyControl.RenderContents(HtmlTe xtWriter
>>> output) in C:\Work\WebSite1\WebControlLibrary1\MyControl.cs:l ine 27
>>> at System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter
>>> writer)
>>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>>> writer, ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>>> ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>>> at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
>>> writer, ICollection children)
>>> at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
>>> at
>>> System.Web.UI.HtmlControls.HtmlForm.RenderChildren (HtmlTextWriter
>>> writer)
>>> at
>>> System.Web.UI.HtmlControls.HtmlContainerControl.Re nder(HtmlTextWriter
>>> writer)
>>> at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTex tWriter
>>> output)
>>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>>> writer, ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>>> ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>>> at
>>> System.Web.UI.HtmlControls.HtmlForm.RenderControl( HtmlTextWriter
>>> writer)
>>> at System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter
>>> writer, ICollection children)
>>> at System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
>>> at System.Web.UI.Control.Render(HtmlTextWriter writer)
>>> at System.Web.UI.Page.Render(HtmlTextWriter writer)
>>> at System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter
>>> writer, ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer,
>>> ControlAdapter adapter)
>>> at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
>>> at System.Web.UI.Page.ProcessRequestMain(Boolean
>>> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>>>

>>
>>

>
>




Jonas 06-12-2006 07:23 AM

Re: TreeView in Web Custom Control
 
I got it working by adding the following line:
treeview.SkipLinkText = "";
before treeview.RenderControl(writer).

Thanks alot Gaurav!


Prakash V 06-12-2006 09:50 AM

Re: TreeView in Web Custom Control
 
Hi,
after adding treeview.SkipLinkText = ""; also it's not working, it now
expects GetImageUrl. i am giving my code and stack trace below.

public partial class TreeviewRender : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (IsPostBack)

RenderTree();

}

private string RenderTree()

{

TreeView Tview = new TreeView();

TreeNode tnode = new TreeNode("Node1", "1");

Tview.Nodes.Add(tnode);

Tview.ID = "Tree1";

Tview.SkipLinkText = "";

StringBuilder sb = new StringBuilder();

StringWriter sw = new StringWriter(sb);

HtmlTextWriter htmlTW = new HtmlTextWriter(sw);

Tview.RenderControl(htmlTW);

return sb.ToString();

}

}


Source Error:


Line 30: StringWriter sw = new StringWriter(sb);
Line 31: HtmlTextWriter htmlTW = new HtmlTextWriter(sw);
Line 32: Tview.RenderControl(htmlTW);
Line 33: return sb.ToString();
Line 34:


Source File: d:\TestProject\TestProject\TreeviewRender.aspx.cs Line: 32

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an
object.]
System.Web.UI.WebControls.TreeView.GetImageUrl(Int 32 index) +4107
System.Web.UI.WebControls.TreeNode.Render(HtmlText Writer writer, Int32
position, Boolean[] isLast, Boolean enabled) +2700
System.Web.UI.WebControls.TreeView.RenderContents( HtmlTextWriter writer)
+294
System.Web.UI.WebControls.WebControl.Render(HtmlTe xtWriter writer) +43
System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer,
ControlAdapter adapter) +74
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter
adapter) +291
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +49
TreeviewRender.RenderTree() in
d:\TestProject\TestProject\TreeviewRender.aspx.cs: 32
TreeviewRender.Page_Load(Object sender, EventArgs e) in
d:\TestProject\TestProject\TreeviewRender.aspx.cs: 18
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o,
Object t, EventArgs e) +31
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender,
EventArgs e) +68
System.Web.UI.Control.OnLoad(EventArgs e) +88
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3034



Thanks in Advance,
Prakash.V
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42

"Jonas" <jonas.samuelsson@cab.se> wrote in message
news:1150097002.300364.201990@i40g2000cwc.googlegr oups.com...
>I got it working by adding the following line:
> treeview.SkipLinkText = "";
> before treeview.RenderControl(writer).
>
> Thanks alot Gaurav!
>




itaisc 10-09-2007 04:02 PM

Same problem with treeView Control
 
Anyone solved this problem??? please help.

itaisc 10-11-2007 07:45 AM

I have a kind of solution...
 
What I did is to inherit From TreeView and that gave me all the functionalities of Web control and also cause my control to become a control with TreeView that can be rendered properly.

Then when I needed to add some more controls like Text Box and Button I just override the "RenderControl" function and add to it's HtmlTextWriter
my rendered controls.

Hope that it helped you guys!

:congrats:


All times are GMT. The time now is 07:41 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.