code: function(options) {
  
        this.options = {};
        this.options.id = options.id || Dom.generateId();
        this.options.parentEl = lang.isString(options.parentEl) ? Dom.get(options.parentEl) : options.parentEl;
        
  		this.options.columnDefs = options.columnDefs;
  
        this.options.allowInsert = lang.isUndefined(options.allowInsert) ? true : options.allowInsert;
        this.options.allowModify = lang.isUndefined(options.allowModify) ? true : options.allowModify;
        this.options.allowDelete = lang.isUndefined(options.allowDelete) ? true : options.allowDelete; 
        
        this.options.showHideColumnsDlg = lang.isUndefined(options.showHideColumnsDlg) ? false : options.showHideColumnsDlg; 
        
        this.options.datasource = options.datasource;
  
  		// Create a datasource if it does not exist, from the datasourceConfig Object
  		if(!options.datasource && options.datasourceConfig) {
  			var ds = new YAHOO.util.DataSource(options.datasourceConfig.url), fields = [];
  			if(options.datasourceConfig.keys) {
  				for ( var i = 0 ; i < options.datasourceConfig.keys.length ; i++ ) {
  	         	fields.push({ key: options.datasourceConfig.keys[i] });
  	      	}
  			}
  	      ds.responseType = options.datasourceConfig.responseType || YAHOO.util.DataSource.TYPE_JSON;
  	      ds.responseSchema = options.datasourceConfig.responseSchema || { resultsList : "Result", fields : fields};
  			this.options.datasource = ds;
  		}
  
        this.options.datatableOpts = options.datatableOpts;
        this.options.fields = options.fields;
  
  		this.options.dialogId = options.dialogId || null;
  		this.options.dialogLabel = options.dialogLabel || "";
  		
  		this.options.panelConfig = options.panelConfig || {
  			constraintoviewport: true, 
  			underlay:"shadow", 
  			close:true, 
  			fixedcenter: true,
  			visible:true, 
  			draggable:true,
  			modal: true
  		};
     }
docs: Set the options