add jqGrid and fix some bugs