property Items.InnerCell ([Item as Variant], [ColIndex as Variant], [Index as Variant]) as Variant
Retrieves the inner cell.

TypeDescription
Item as Variant A long expression that indicates the handle of the item where the cell is, or 0. If the Item parameter is 0, the ColIndex parameter must indicate the handle of the cell.
ColIndex as Variant A long expression that indicates the index of the column where a cell is divided, or a long expression that indicates the handle of the cell being divided, if the Item parameter is missing or it is zero.
Index as Variant A long expression that indicates the index of the inner being requested. If the Index parameter is missing or it is zero, the InnerCell property retrieves the master cell. 
Variant A long expression that indicates the handle of the inner cell.
Use the InnerCell property to get the inner cell. The InnerCell( , , 0 ) property always retrieves the same cell. The InnerCell( , , 1 ) retrieves the first inner cell, and so on. The InnerCells property always retrieves a non empty value. For instance, if a cell contains only two splitted cells, the InnerCell( , , 3 ), or InnerCell( , , 4 ), and so on, always retrievs the last inner cell. The SplitCell method splits a cell in two cells ( the newly created cell is called inner cell ). Use the CellParent property to get the parent of the inner cell. Use the CellItem property to get the item that's the owner of the cell. Use the CellWidth property to specify the width of the inner cell. Use the CellParent property to determine whether the cell is a master cell or an inner cell. If the CellParent property gets 0, it means that the cell is master, else it is inner.

The following VB sample specifies whether a cell contains inner cells ( the function checks whether a cell is splitted ):

Private Function isSplit(ByVal g As EXGRIDLibCtl.Grid, ByVal h As EXGRIDLibCtl.HITEM, ByVal c As Long) As Boolean
    With g.Items
        isSplit = IIf(Not .InnerCell(h, c, 0) = .InnerCell(h, c, 1), True, False)
    End With
End Function

The following VB sample gets the master cell:

Private Function getMaster(ByVal g As EXGRIDLibCtl.Grid, ByVal h As EXGRIDLibCtl.HITEM, ByVal c As Long) As EXGRIDLibCtl.HCELL
    With g.Items
        Dim r As EXGRIDLibCtl.HCELL
        r = c
        If Not (h = 0) Then
            r = .ItemCell(h, c)
        End If
        While Not (.CellParent(, r) = 0)
            r = .CellParent(, r)
        Wend
        getMaster = r
    End With
End Function

The VB following sample enumerates the list of the inner cells ( including the cell where the splitting starts ):

Private Sub enumSplit(ByVal g As EXGRIDLibCtl.Grid, ByVal h As EXGRIDLibCtl.HITEM, ByVal c As Long)
    With g.Items
        Dim i As Long
        i = -1
        Do
            i = i + 1
            Debug.Print .CellCaption(, .InnerCell(h, c, i))
        Loop While Not (.InnerCell(h, c, i) = .InnerCell(h, c, i + 1))
    End With
End Sub

The VB following sample enumerates the list of inner cells, starting from the master cell:

enumSplit Grid1, 0, getMaster(Grid1, h, c)

The following VB sample counts the inner cells:

Private Function getInnerCount(ByVal g As EXGRIDLibCtl.Grid, ByVal h As EXGRIDLibCtl.HITEM, ByVal c As Long) As Long
    With g.Items
        Dim i As Long
        i = -1
        Do
            i = i + 1
        Loop While Not (.InnerCell(h, c, i) = .InnerCell(h, c, i + 1))
        getInnerCount = i
    End With
End Function

The following VC sample specifies whether a cell contains inner cells ( the function checks whether a cell is splitted ):

long V2I( VARIANT* pvtValue )
{
	COleVariant vtResult;
	vtResult.ChangeType( VT_I4, pvtValue );
	return V_I4( &vtResult );
}

BOOL isSplit( CGrid& grid, long h, long c )
{
	CItems items = grid.GetItems();
	return V2I( &items.GetInnerCell( COleVariant( h ), COleVariant( c ), COleVariant( (long)0 ) ) ) != V2I( &items.GetInnerCell( COleVariant( h ), COleVariant( c ), COleVariant( (long)1 ) ) );
}

The following VC sample gets the master cell:

long getMaster( CGrid& grid, long h, long c )
{
	COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR;
	CItems items = grid.GetItems();
	long r = c;
	if ( h != 0 )
		r = items.GetItemCell( h, COleVariant( c ) );
	while ( V2I( &items.GetCellParent( vtMissing, COleVariant( r ) ) ) != 0 )
		r = V2I( &items.GetCellParent( vtMissing, COleVariant( r ) ) );
	return r;
}

The following VC sample counts the inner cells:

long getInnerCount( CGrid& grid, long h, long c )
{
	CItems items = grid.GetItems();
	COleVariant vtItem( h ), vtColumn( c );
	long i = -1;
	do
	{
		i++;
	}
	while ( V2I( &items.GetInnerCell( vtItem, vtColumn, COleVariant( i )  ) ) != V2I( &items.GetInnerCell( vtItem, vtColumn, COleVariant( (long)(i + 1) )  ) ) );
	return i;
}

The following VB.NET sample splits the first visible cell in two cells:

With AxGrid1.Items
    Dim i As Object
    i = .SplitCell(.FirstVisibleItem, 0)
    .CellValue(Nothing, i) = "inner cell"
End With

The following C# sample splits the first visible cell in two cells:

EXGRIDLib.Items items = axGrid1.Items;
object i = items.get_SplitCell(items.FirstVisibleItem, 0);
items.set_CellValue(null, i, "inner cell");

The following VFP sample splits the first visible cell in two cells:

with thisform.Grid1.Items
	local i
	i = .SplitCell(.FirstVisibleItem,0)
	local s, crlf
	crlf = chr(13) + chr(10)
	s = "Items" + crlf
	s = s + "{" + crlf
	s = s + "CellValue(," + str(i) + ") = " + chr(34) + "inner cell" + chr(34) + crlf
	s = s + "}"
	thisform.Grid1.Template = s
endwith