public static string GetCurrentValue(this IGridDataKey dataKey, IValueProvider valueProvider)
        {
            var value = valueProvider.GetValue(dataKey.RouteKey);

            if (value != null)
            {
                return(value.AttemptedValue);
            }

            return(null);
        }
        public static string GetCurrentValue(this IGridDataKey dataKey, IDictionary <string, ValueProviderResult> valueProvider)
        {
            ValueProviderResult value;

            valueProvider.TryGetValue(dataKey.RouteKey, out value);

            if (value != null)
            {
                return(value.AttemptedValue);
            }

            return(null);
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GridDataKeyBuilder&lt;TModel&gt;"/> class.
 /// </summary>
 /// <param name="dataKey">The dataKey.</param>
 public GridDataKeyBuilder(IGridDataKey <TModel> dataKey)
 {
     this.dataKey = dataKey;
 }