Ejemplo n.º 1
0
        /// <summary>
        /// Provides metadata to the model metadata creation process.
        /// </summary>
        /// <param name="metadata">The model metadata.</param>
        protected override void InternalOnMetadataCreated(ModelMetadata metadata)
        {
            SearchOptions.DataEvents      = DataEvents;
            SearchOptions.DataUrl         = DataUrl;
            SearchOptions.HtmlAttributes  = HtmlAttributes;
            SearchOptions.ValueDictionary = ValueDictionary;

            if (SearchType == JqGridColumnSearchTypes.JQueryUIAutocomplete)
            {
                SearchType = JqGridColumnSearchTypes.Text;
                SearchOptions.ConfigureJQueryUIAutocomplete();
            }
            else if (SearchType == JqGridColumnSearchTypes.JQueryUIDatepicker)
            {
                SearchType = JqGridColumnSearchTypes.Text;
                SearchOptions.ConfigureJQueryUIDatepicker(metadata);
            }
            else if (SearchType == JqGridColumnSearchTypes.JQueryUISpinner)
            {
                SearchType = JqGridColumnSearchTypes.Text;
                SearchOptions.ConfigureJQueryUISpinner();
            }

            metadata.SetColumnSearchable(Searchable);
            metadata.SetColumnSearchOptions(SearchOptions);
            metadata.SetColumnSearchRules(Rules);
            metadata.SetColumnSearchType(SearchType);
        }