作成日: 2020/09/08 最終更新日: 2020/12/25
文書種別
不具合
状況
修正済み
詳細
データにNull値が含まれている列に対してOrderByプロパティでソートの設定を有効にすると、アプリケーションの実行時に下記の例外が発生します。
NullReferenceException: Object reference not set to an instance of an object.
C1.Web.Mvc.SupportNullsFistComparer.Compare(T x, T y)
InvalidOperationException: Failed to compare two elements in the array.
System.Collections.Generic.GenericArraySortHelper.Sort(T[] keys, int index, int length, IComparer comparer)
TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor, bool wrapExceptions)
C1.Web.Mvc.SupportNullsFistComparer
InvalidOperationException: Failed to compare two elements in the array.
System.Collections.Generic.GenericArraySortHelper
TargetInvocationException: Exception has been thrown by the target of an invocation.
System.RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor, bool wrapExceptions)
回避方法
この問題は2020J v3(4.5.20203.297)で修正されました。
※修正版を適用しない場合の回避方法は以下の通りです。
OrderByプロパティによってソートを行う代わりに、下記のようにJavaScriptでFlexGridのcollectionViewを取得し、ソートを実行してください。
※修正版を適用しない場合の回避方法は以下の通りです。
OrderByプロパティによってソートを行う代わりに、下記のようにJavaScriptでFlexGridのcollectionViewを取得し、ソートを実行してください。
<script>
c1.documentReady(function () {
var grid = wijmo.Control.getControl("#flexGrid");
var view = grid.collectionView;
view.sortDescriptions.push(new wijmo.collections.SortDescription('Country"', true));
});
</script>
@(Html.C1().FlexGrid()
.Id("flexGrid")
・・・
.Columns(bl => {
・・・
bl.Add(cb => cb.Binding("Country").Header("Country"));
})
)
c1.documentReady(function () {
var grid = wijmo.Control.getControl("#flexGrid");
var view = grid.collectionView;
view.sortDescriptions.push(new wijmo.collections.SortDescription('Country"', true));
});
</script>
@(Html.C1().FlexGrid()
.Id("flexGrid")
・・・
.Columns(bl => {
・・・
bl.Add(cb => cb.Binding("Country").Header("Country"));
})
)
旧文書番号
85979