The Rule
Pretty simple elegant answer here. When you grapple, you share an opponent's space. This Rules of the Game article spells it out for you.
You share your foe's space when you're grappling. If you and your foe are different sizes, use the larger of the two space entries. Any attack that can reach the shared space can hit you. You don't get cover from a foe you're grappling, but any ranged attack aimed into your shared space has an equal chance to strike you or the creature you're grappling. Roll randomly to determine which creature a ranged attack strikes (see note 3 on Table 8-6 in the Player's Handbook). If you use a weapon against a foe you're grappling (see Part Two), you don't have to roll to determine the target you actually attack.
So, with this information in mind, the answers to your questions are;
1) No - You are grappling, and so lose your dexterity bonus.
2) Yes - You are grappling, so when someone tries to hit you or the creature you are in a grapple with, you roll randomly to see who is the target of the attack. This is only for ranged attacks.
3) Yes - If you are able to cast a spell or trigger an ability that requires contact, you can do so. You are "sharing a space" and so are in range.
When your opponent is Large
Also from Rules of the Game
You share your foe's space when you're grappling. If you and your foe are different sizes, use the larger of the two space entries.
Exceptions to the Rule
The Roper is the classic monster that grabs an opponent with a tentacle. It has special rules that differentiate it from a grapple.
From the Roper's stat-block
If a roper hits with a strand attack, the strand latches onto the opponent’s body. This deals no damage but drags the stuck opponent 10 feet closer each subsequent round (provoking no attack of opportunity) unless that creature breaks free, which requires a DC 23 Escape Artist check or a DC 19 Strength check. The check DCs are Strength-based, and the Escape Artist DC includes a +4 racial bonus. A roper can draw in a creature within 10 feet of itself and bite with a +4 attack bonus in the same round. A strand has 10 hit points and can be attacked by making a successful sunder attempt. However, attacking a roper’s strand does not provoke an attack of opportunity. If the strand is currently attached to a target, the roper takes a -4 penalty on its opposed attack roll to resist the sunder attempt. Severing a strand deals no damage to a roper.
In this situation, neither the creature or the target are in a grapple, nobody loses their bonus to dexterity, ranged attacks do not have a chance of striking an ally, and you can not target the roper with a touch attack if you outside of his range (but you can target the roper's strands, which have hit points of their own).