GridView-可编辑的组合框数据变慢

时间:2019-02-10 02:31:57

标签: html asp.net-mvc gridview combobox dropdown

这是我在gridview中自定义列以显示数据的代码。我尝试从我在comboBox中键入的可编辑文本中获取数据,但是数据输出变得太慢而无法显示在列表中

 settings.Columns.Add(column =>
    {
        column.FieldName = "Food";
        column.Caption = "Food List";
        column.Width = 350;
        column.ColumnType = MVCxGridViewColumnType.ComboBox;
        var comboBoxProperties = column.PropertiesEdit as ComboBoxProperties;
       comboBoxProperties.Width = new System.Web.UI.WebControls.Unit(350);
        comboBoxProperties.DataSource = Food.Shared.ListFood;   
        comboBoxProperties.TextField = "Value";
        comboBoxProperties.ValueField = "Key";
       comboBoxProperties.ValueType = typeof(Guid);
       comboBoxProperties.IncrementalFilteringMode = IncrementalFilteringMode.Contains;
        comboBoxProperties.ItemStyle.Wrap = DefaultBoolean.True;
       comboBoxProperties.ClientInstanceName = "foodListTo";
    });

0 个答案:

没有答案