Showing results for 
Search instead for 
Did you mean: 

Add column is grid

Former Member
0 Kudos

Private oGrid As SAPbouiCOM.Grid

oItem = objForm.Items.Add("dtgItems", SAPbouiCOM.BoFormItemTypes.it_GRID)

I have created grid using the above code.I have added two columns in grid and these coulmns are present in table.I want to add new column Edit in grid.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


You can't add a column in a grid becoz gird does not allow to add a seperate column though coding.Columns creates on the basis of associate query at run time.


Former Member
0 Kudos

Dear Vikas,

I solved the problem by updating the query as,

"select ItemCode,ItemName, 'Edit' As Edit from OITM"

Thanks for u r help.


Dilip Kumbhar

Former Member
0 Kudos

dear dilip,

u can add a column in grid by code as follow

Dim oGrid As SAPbouiCOM.Grid

oGrid = oForm.Items.Item("<Grid Name>").Specific

Dim oColumns As SAPbouiCOM.Columns

Dim oColumn As SAPbouiCOM.Column

oColumns = oGrid.Columns

oColumn = oColumns.Add("", SAPbouiCOM.BoFormItemTypes.it_EDIT)

oColumn.DataBind.SetBound(True, "<SBO Table Name>", "<UDF Column Name>")

hope this can give u idea, if satisfied, rewards points


nirdesh panwar

Answers (0)