我如何刷新剑道UI组合框? [英] How do I refresh a Kendo UI combo box?

查看:164
本文介绍了我如何刷新剑道UI组合框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据绑定到一个表记录1000的一个ASP.Net MVC剑道UI组合框。我已经设置属性MINLENGTH至5所以我只返回相关结果。问题是,用户可能需要更改文本值都在一起。有没有办法告诉控制刷新?

这里的code为控制...

  @(Html.Kendo()ComboBoxFor(X =方式> x.Product)
                    。名称(产品)
                    .DataTextField(姓名)//显示值
                    .DataValueField(ID)//返回值
                    .MinLength(5)
                    .AutoBind(假)
                    .Suggest(真)
                    .Filter(FilterType.Contains)
                    .DataSource(来源= GT;
                    {
                        source.Read(读=>
                        {
                            read.Action(产品,家)的数据(onGetProducts);
                        });
                    })
                )


解决方案

如果我明白你的挣扎:
简单地从那里调用read动作以后再需要:

  $(#产品)的数据(kendoComboBox)dataSource.read()。

I have an ASP.Net MVC Kendo UI combobox that is databound to a table with 1000's of records. I've set the MinLength property to 5 so I only return relevant results. The problem is, the user might need to change the text value all together. Is there a way to tell the control to refresh?

Here's the code for the control...

@(Html.Kendo().ComboBoxFor(x => x.Product)
                    .Name("Product")
                    .DataTextField("Name") // Display value
                    .DataValueField("Id") //Return value
                    .MinLength(5)
                    .AutoBind(false)
                    .Suggest(true)
                    .Filter(FilterType.Contains)
                    .DataSource(source =>
                    {
                        source.Read(read =>
                        {
                            read.Action("Products", "Home").Data("onGetProducts");
                        });
                    })
                )

解决方案

if I understand what you are struggling with: simply call read action again from where ever you need:

$("#Product").data("kendoComboBox").dataSource.read();

这篇关于我如何刷新剑道UI组合框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆