G
Guest
I'm trying to create a gridview custom control in VS2005 with some column
predefined.
I get the error StackOverflowException.
Can anybody show me some resource link, please?
Thanks in advance.
Daniele Farina
There is the wrong code:
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.WebControls
<DefaultProperty(""), ToolboxData("<{0}:GridViewTest
runat=server></{0}:GridViewTest>")> Public Class GridViewTest
Inherits System.Web.UI.WebControls.GridView
Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
Dim cbSel As New CommandField
cbSel.ShowSelectButton = True
cbSel.SelectText = "TestoSelezione"
Me.Columns.Add(cbSel)
MyBase.Render(output)
End Sub
End Class
predefined.
I get the error StackOverflowException.
Can anybody show me some resource link, please?
Thanks in advance.
Daniele Farina
There is the wrong code:
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.WebControls
<DefaultProperty(""), ToolboxData("<{0}:GridViewTest
runat=server></{0}:GridViewTest>")> Public Class GridViewTest
Inherits System.Web.UI.WebControls.GridView
Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
Dim cbSel As New CommandField
cbSel.ShowSelectButton = True
cbSel.SelectText = "TestoSelezione"
Me.Columns.Add(cbSel)
MyBase.Render(output)
End Sub
End Class