Sensex gains 266 points on global cues