Saravana said:
Thanks, those examples helped me a lot, and I'm now able to add some
columns.
But, how can I make those columns persistant? They dissapear when I do a
postback of the page.
I add the column in the Page_Load method, according to the example in
http://www.dotnetbips.com/displayarticle.aspx?id=85:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Dim tc1 As TemplateColumn
tc1 = New TemplateColumn()
tc1.ItemTemplate = New CTemplateColumn("Include")
tc1.HeaderText = "First name"
dgValues.Columns.Add(tc1)
tc1 = Nothing
PopulatePrdGruppeLev0()
End If
End Sub
The datagrid, dgValues, gets populated in the method
PopulatePrdGruppeLev0().
-as