This is a migrated thread and some comments may be shown as answers.

Create Edit Column Programitically

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 2
Stefan asked on 06 Jun 2013, 03:35 PM
Hi I have to create a grid dynamically.  I can do most of it in vb code behind but I also need an edit column?  What is the syntax for this creation?

        boundColumn = New GridBoundColumn()
        dgCompDetails.MasterTableView.Columns.Add(boundColumn)
        boundColumn.DataField = "ippComponentSrcValue"
        boundColumn.UniqueName = "dgippComponentSrcValue"
        boundColumn.Display = True
        boundColumn.HeaderText = "Value"

I need the next column to be a

GridEditCommandColumn

but can not figure out the correct syntax.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Jun 2013, 04:17 AM
Hi,

Please take a look into the following code.

VB:
Dim edit As New GridEditCommandColumn()
dgCompDetails.MasterTableView.Columns.Add(edit)

Thanks,
Shinu.
Tags
Grid
Asked by
Stefan
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Share this question
or