Posted 5 October 2018, 7:47 am EST
Hi All,
In the meantime, you can use below workaround for getting selected record’s ids:
List<int> selectedIds = new List<int>();
private void button1_Click(object sender, EventArgs e)
{
selectedIds.Clear();
C1.Win.Input.C1CheckListSelectedItemCollection col = c1MultiSelect1.SelectedItems;
for(int selectCnt=0; selectCnt < col.Count; selectCnt++)
{
for (int itemCnt = 0; itemCnt < c1MultiSelect1.Items.Count; itemCnt++)
{
if (c1MultiSelect1.Items[itemCnt].GetHashCode() == c1MultiSelect1.SelectedItems[selectCnt].GetHashCode())
{
selectedIds.Add(Convert.ToInt32(dt.Rows[itemCnt]["Id"]));
}
}
}
if (selectedIds.Count>0)
{
selectedIds.Sort();
MessageBox.Show("Your selected ids: [" + string.Join(",",selectedIds) + "]");
}
else
{
MessageBox.Show("You are not select any option.");
}
}
Also find the sample application attached for complete implementation.
Thanks,
Singh
prj_MultiSelect_FetchSelection.zip