I have been thinking on your problem for many days, but it seems it has no simple solution - at least, in the form of the original specification. The main problem is that you need to show customer names which may be duplicated for different id's. And there is a question for you related to this: how will your customer distinguish two different customers with the same name?
A feasible solution I suggest is to display the customer id in addition to its name in group rows/cells. Then you can use cell dynamic contents for that. Here is my code that should explain the implementation of the idea much better:
Option Compare Database
Option Explicit
Private Const CUST_ID_COL As Long = 1
Private m_arrCustomerName(1 To 3) As String
Private Sub Form_Load()
m_arrCustomerName(1) = "ABC Company"
m_arrCustomerName(2) = "XYZ Company"
m_arrCustomerName(3) = "ABC Company"
Dim grd As iGrid
Set grd = iGrid0.Object
With grd
.BeginUpdate
.ColCount = 3
.RowCount = 3
.CellValue(1, CUST_ID_COL) = 1
.CellValue(1, 2) = 111
.CellValue(2, CUST_ID_COL) = 2
.CellValue(2, 2) = 222
.CellValue(3, CUST_ID_COL) = 3
.CellValue(3, 2) = 333
.ColSortType(CUST_ID_COL) = igSortByCellTextNoCase
.GroupObject.AddItem CUST_ID_COL, igSortAsc, igSortByCellTextNoCase
.Group
.EndUpdate
End With
End Sub
Private Sub iGrid0_CellDynamicText(ByVal lRow As Long, ByVal lCol As Long, ByVal vValue As Variant, sText As String)
If (lCol = CUST_ID_COL) Then
sText = m_arrCustomerName(vValue) & " (" & vValue & ")"
End If
End Sub
This is the full form module of the sample I was playing with. The array m_arrCustomerName is used to get the customer name by its id (just for a sample).