简体   繁体   English

EXT JS Grid SelModel复选框问题

[英]EXT JS Grid SelModel checkbox issue

How to set the Grid Selmodel Chekbox gets selected based on the Text field Value. 如何设置网格Selmodel Chekbox是基于“文本”字段值选择的。 For Example:I have a grid of values like one,two,three and while page loading user will provide the value as Two in the textfield then the grid automatically gets selected the CheckBox of Two value. 例如:我有一个值网格,如一,二,三,页面加载时,用户将在文本字段中将值提供为二,然后网格会自动选择二值复选框。

Thanks in Advance... 提前致谢...

I suppose you have a store containing the values from the grid so you could search for the record containing your value from the text field and after that, use the grid's selection model to select it: grid.getSelectionModel().select(record). 我想您有一家商店,其中包含来自网格的值,因此您可以从文本字段中搜索包含您的值的记录,然后,使用网格的选择模型来选择它:grid.getSelectionModel()。select(record)。

I created a fiddle to demonstrate what I just said: https://fiddle.sencha.com/#fiddle/1gvv 我创建了一个小提琴来演示我刚才说的内容: https : //fiddle.sencha.com/#fiddle/1gvv

I hope this helps 我希望这有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM