I was googling for a long time for this and I didn’t find an answer. Finally I got it.

I really don’t understand how it works but it works.

My problem was that the glossary mode in views seemed to only work with title field of node. I wanted to set glossary mode to look for text in field_apellidos (CCK field). What I did was:
I deleted contextual filters for both Page and Attachment display (content: title)
For both “Page display” and “Attachment display” I created a contextual filter for my custom field and set “glossary mode”
The contextual filter for Page display is where I set the default behavior. i.e. show all items.
The contextual filter tor Attachment is where I set “Display a summary”. This is what makes the “A | B | C |… ” block at top.