Custom gridview

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top