获得 CheckBoxList 选中的 Index - CheckBoxListGetListSelectedIndex
2017-02-19 14:06:05 访问(1595) 赞(0) 踩(0)
/// <summary>
/// 获得 CheckBoxList 选中的 Index - CheckBoxListGetListSelectedIndex
/// </summary>
/// <param name="chkl"></param>
/// <returns></returns>
public List<int> CheckBoxListGetListSelectedIndex(FineUI.CheckBoxList chkl)
{
if (chkl == null)
throw new Exception("FineUI.CheckBoxList chkl == null");
List<int> theResult = new List<int>();
int iCount = chkl.Items.Count;
for (int i = 0; i < iCount; ++i)
{
if (chkl.Items[i].Selected)
theResult.Add(i);
}
return theResult;
}
标签:
获得 CheckBoxList 选中的 Index - CheckBoxListGetListSelectedIndex 


上一条:
下一条:
相关评论
发表评论