I have the following example with adds a dynamic template field to my gridview. However its being added at index = 0.
I need it at the end of the gridview, which has columns determined by user entry, so they will not always be the same amount of columns.
How do I get this template field to be the last column in my gridview. I have already tried columns.Insert(index, mycolname) and I get an "out of range" error message
Protected Sub rtrv_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rtrv.Click
Dim bldvw As base, ds As DataTable, dc As DataColumn
bldvw = New base
ds = bldvw.bldDynGrd(srCtr.Text, srActiv.Text, srAcct.Text)
If ds IsNot DBNull.Value Then
For Each dc In ds.Columns
Dim bField As New BoundField
'Initalize the DataField value.
View Complete Post