var dynCol = function (field) {
	///	<summary>
	///	 列基类
	///	</summary>
	this.name = field;
};
dynCol.prototype = {
	ctr: "<input type='text' />",
	read: function (ctr, row) {
		row[this.name] = ctr.val();
	},
	write: function (ctr, row) {
		var v = row[this.name];
		if (v === undefined || v === null) v = "";
		ctr.val(unescape(v));
	},
	onValidate: function (ctr, index, td, grid) {
		if (!ctr.attr("disabled") && !$.trim(ctr.val())) {
			ctr.focus();
			alert("请填写“" + grid.getColumnCaption(index) + "”...");
			return false;
		} else return true;
	},
	getCtr: function (td) {
		return td.find("input");
	},
	onCellCreated: function (ctr, idx, allowEdit) {
		ctr.addClass(this.className);
	},
	getDisplayText: function (ctr) {
		return ctr.val();
	},
	bind: function (evtName, evtFn) {
		if (!this.evts) this.evts = {};
		var arr = this.evts[evtName];
		if (!arr) {
			this.evts[evtName] = arr = [];
		}
		arr.push(evtFn);
		return this;
	},
	attr: function (key, val) {
		if (!this.attrs) this.attrs = {};
		this.attrs[key] = val;
		return this;
	},
	css: function (key, val) {
		if (!this.styles) this.styles = {};
		this.styles[key] = val;
		return this;
	},
	create: function () {
		var el = $(this.ctr);
		if (this.attrs) {
			el.attr(this.attrs);
		}
		if (this.styles) {
			el.css(this.styles);
		}
		if (this.evts) {
			$.each(this.evts, function (k, v) {
				$.each(v, function (i, f) {
					el.bind(k, f);
				});
			});
		}
		return el;
	}
};
@@ -230,24 +230,99 @@
 ctr, row) %7B%0A
+%09%09ctr.val(this.getNullSafeVal(row));%0A%09%7D,%0A%09getNullSafeVal: function (row) %7B%0A
 %09%09var v = ro
@@ -382,24 +382,23 @@
 = %22%22;%0A%09%09
-ctr.val(
+return 
 unescape
@@ -400,17 +400,16 @@
 scape(v)
-)
 ;%0A%09%7D,%0A%09o
@@ -732,39 +732,55 @@
 ) %7B%0A
-%09%09ctr.addClass(this.className);
+%0A%09%7D,%0A%09onCellDataBound: function (ctr, row) %7B%0A%09%09
 %0A%09%7D,

Add getNullSafeVal method