Most of the Yii widgets will have an “id” property that you can set at initialization and in case you don’t set it, then it will show that auto-generated id.
'id'=>$modelName.'-grid',//if i wouldn't set it here, Yii would generate it for me.
To remove the id, i think you can just set it to null (didn’t tried).
To give the widget a certain class, use the htmlOptions property, almost all the widgets have this.
To be sure that you pass the right properties, just use the documentation and see what properties are available for the widget you use.