Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have tried this code and it is running perfectly fine for returning single row index plz modify it so that it an return multiple index.




public int GetSelectedIndex()
{

if(selectedIndices.Count>0) {

return (int)selectedIndices[0];
}
return -1;
}
Posted
Updated 13-Jul-19 18:00pm

1 solution

You need a loop construct like this: http://www.dotnetperls.com/for[^]
and store the selected indices in a list and return that list:
http://www.dotnetperls.com/list[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900