Example #1
0
        private void ProcessDataSource()
        {
            if (Pageable.Enabled && DataSource.PageSize == 0)
            {
                DataSource.PageSize = 10;
            }

            var binder = new DataSourceRequestModelBinder();

            if (this.PrefixUrlParameters)
            {
                binder.Prefix = Name;

                if (DataSource.Type == DataSourceType.Server)
                {
                    DataSource.Transport.Prefix = Name + "-";
                }
            }

            var controller     = ViewContext.Controller;
            var bindingContext = new ModelBindingContext()
            {
                ValueProvider = controller.ValueProvider
            };

            var request = (DataSourceRequest)binder.BindModel(controller.ControllerContext, bindingContext);

            DataSource.Process(request, !EnableCustomBinding);
        }
Example #2
0
        private void ProcessDataSource()
        {
            var binder = new DataSourceRequestModelBinder();

            var controller     = ViewContext.Controller;
            var bindingContext = new ModelBindingContext()
            {
                ValueProvider = controller.ValueProvider
            };

            var request = (DataSourceRequest)binder.BindModel(controller.ControllerContext, bindingContext);

            DataSource.Process(request, true /*!EnableCustomBinding*/);
        }