public static List <string> ToListOfString(this IEnumerable en, JQAutoComplete autoComplete) { DataTable dataTable = en.ToDataTable(autoComplete); List <string> list = new List <string>(); IEnumerator enumerator = dataTable.Rows.GetEnumerator(); try { DataRow row; while (enumerator.MoveNext()) { row = (DataRow)enumerator.Current; if (string.IsNullOrEmpty(list.Find((string s) => s == row[autoComplete.DataField].ToString()))) { list.Add(row[autoComplete.DataField].ToString()); } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } return(list); }
public MvcHtmlString JQAutoComplete(JQAutoComplete autoComplete, string id) { JQAutoCompleteRenderer jQAutoCompleteRenderer = new JQAutoCompleteRenderer(autoComplete); autoComplete.ID = id; return(MvcHtmlString.Create(jQAutoCompleteRenderer.RenderHtml())); }
public static List<string> ToListOfString(this IEnumerable en, JQAutoComplete autoComplete) { DataTable dataTable = en.ToDataTable(autoComplete); List<string> list = new List<string>(); IEnumerator enumerator = dataTable.Rows.GetEnumerator(); try { DataRow row; while (enumerator.MoveNext()) { row = (DataRow)enumerator.Current; if (string.IsNullOrEmpty(list.Find((string s) => s == row[autoComplete.DataField].ToString()))) { list.Add(row[autoComplete.DataField].ToString()); } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } return list; }
internal static string ConstructLinqFilterExpression(JQAutoComplete autoComplete, Util.SearchArguments args) { Guard.IsNotNull(autoComplete.DataField, "DataField", "must be set in order to perform search operations. If you get this error from search/export method, make sure you setup(initialize) the grid again prior to filtering/exporting."); string filterExpressionCompare = "{0} {1} \"{2}\""; return(Util.GetLinqExpression(filterExpressionCompare, args, false, typeof(string))); }
public static DataTable ToDataTable(this IEnumerable en, JQAutoComplete autoComplete) { return(en.ToDataTable(new JQGrid { Columns = { new JQGridColumn { DataField = autoComplete.DataField } } })); }
public static DataTable ToDataTable(this IEnumerable en, JQAutoComplete autoComplete) { return en.ToDataTable(new JQGrid { Columns = { new JQGridColumn { DataField = autoComplete.DataField } } }); }
public JQAutoCompleteRenderer(JQAutoComplete autoComplete) { this._model = autoComplete; }
public MvcHtmlString JQAutoComplete(JQAutoComplete autoComplete, string id) { JQAutoCompleteRenderer jQAutoCompleteRenderer = new JQAutoCompleteRenderer(autoComplete); autoComplete.ID = id; return MvcHtmlString.Create(jQAutoCompleteRenderer.RenderHtml()); }