Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs sencha touch2中的下拉列表_Extjs_Sencha Touch 2 - Fatal编程技术网

Extjs sencha touch2中的下拉列表

Extjs sencha touch2中的下拉列表,extjs,sencha-touch-2,Extjs,Sencha Touch 2,我目前正在开发sencha touch 2。现在我面临的问题是,我想在itemTpl中添加下拉列表,或者在下面的代码中添加列表 itemTpl : [ '<table border="1" style="width:100%; margin-top:0px;"><tr>', '<td style="width:10%; text-align: center; line-height: 2; font-size: 10px

我目前正在开发sencha touch 2。现在我面临的问题是,我想在itemTpl中添加下拉列表,或者在下面的代码中添加列表

itemTpl : [
           '<table border="1" style="width:100%; margin-top:0px;"><tr>',
           '<td style="width:10%; text-align: center; line-height: 2;  font-size: 10px;">here need to add Dropdown with store data</td>',
           '</tr></table>']  
请帮忙

谢谢,这是事先准备好的


Mukesh

您不能直接在HTML中添加组件,但有解决方法,请按照以下步骤操作

只需在表单或容器中添加selectfield作为单独的控件,然后在浏览器上运行该页面,打开开发者工具,使用css类检查并复制selectfield的整个html内容,并将其粘贴到itemtpl,它将显示为sencha touch selectfield

我在一个项目中就是这样做的。我知道这不是标准的方法,但有时你不得不处理变通方法

如果你愿意,我可以和你分享代码

希望这有助于:

谢谢
Sachin

。是否要添加它,以及?问题在哪里?你的帖子不是很清楚,你不能直接在HTML中添加组件,如果你想创建嵌套/下拉列表,你应该使用合适的组件或扩展。我想你应该看看