我有一个devexpress combobx:
Html.DevExpress().ComboBox(s =>
{
s.Name = idPola;
s.Style.Add("float", "left");
foreach (SelectListItem item in list)
{
s.Properties.Items.Add(new ListEditItem()
{
Text = item.Text,
Value = item.Value,
Selected = item.Value == selectedValue
});
}
s.SelectedIndex = selectedIndex;
s.Properties.IncrementalFilteringMode = IncrementalFilteringMode.StartsWith;
s.ClientVisible = ControlVisible;
if (Model.Alternative)
{
s.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e){ffff(s)}";
}
else
{
s.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e){HideTextBox(s,e)}";
}
s.Properties.EnableClientSideAPI = true;
}).Render();
如何在HideTextBox函数中使用JavaScript获取所选项目的id?
1条答案
按热度按时间mrphzbgm1#
使用客户端GetValue方法: