ds无数据。报错:ds.defaultViewManager.System.ComponentModel.IBindingList.IsSorted”引发了“System.NotSupportedException”类型的异常
if ( ds == null )throw new NotSupportedException();}增加这个判断看看
不支持ds.Tables[x]作为数据源了