Esempio n. 1
0
 /// <summary>
 /// Overriding DataView's SetIndex to prevent users from setting RowState filter to anything other
 /// than CurrentRows.
 /// </summary>
 internal override void SetIndex(string newSort, DataViewRowState newRowStates, IFilter?newRowFilter)
 {
     // Throw only if expressions (filter or sort) are used and rowstate is not current rows
     if ((base.SortComparison != null || base.RowPredicate != null) && newRowStates != DataViewRowState.CurrentRows)
     {
         throw DataSetUtil.Argument(SR.LDVRowStateError);
     }
     else
     {
         base.SetIndex(newSort, newRowStates, newRowFilter);
     }
 }