Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.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
Combobox 如何设置combo.SelectedItem.Index=0;ext.net 2.5版本中的代码隐藏?_Combobox_Ext.net_Selectedindex - Fatal编程技术网

Combobox 如何设置combo.SelectedItem.Index=0;ext.net 2.5版本中的代码隐藏?

Combobox 如何设置combo.SelectedItem.Index=0;ext.net 2.5版本中的代码隐藏?,combobox,ext.net,selectedindex,Combobox,Ext.net,Selectedindex,我已经将项目从ext.NET1.0升级到2.5,新功能组合selectindex at.aspx我们在ext.NET2.5中有类似的属性 <ext:ComboBox runat="server"> <SelectedItems> <ext:ListItem Index="0" /> </SelectedItems> </ext:ComboBox> 但它在2.5中不起作用。请

我已经将项目从ext.NET1.0升级到2.5,新功能组合selectindex at.aspx我们在ext.NET2.5中有类似的属性

 <ext:ComboBox runat="server">
      <SelectedItems> 
        <ext:ListItem Index="0" />
        </SelectedItems>   
    </ext:ComboBox>
但它在2.5中不起作用。请建议!
提前感谢。

当我按元素的值添加元素时,这对我很有用:

ComboBox.SelectedItems.Add(new Ext.Net.ListItem { Value = selectedItemValue});
因此,如果您愿意,您可以简单地根据您的需要进行调整:

ComboBox.SelectedItems.Add(new Ext.Net.ListItem { Index = 0 });
ComboBox.SelectedItems.Add(new Ext.Net.ListItem { Index = 0 });