Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid Column Headers

Status
Not open for further replies.

PopTrain

Programmer
Jun 21, 2001
9
US
I have a datagrid that is populated from a StoredProc no problem here. What I am trying to do is record all changes in my datagrid. What I need is to capture the Column Header value so I can record this change in a table.

Does anyone know how I can obtain the Column heading value or text?

Thanks
 

Public Function GetColHeaders(grd As MSDataGridLib.DataGrid) As Variant
Dim col As MSDataGridLib.Column
Dim ary() As String
Dim I As Integer
ReDim ary(grd.Columns.Count - 1)

For Each col In grd.Columns
ary(I) = col.Caption
I = I + 1
Next col
GetColHeaders = ary
End Function
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top