c# - Cannot apply indexing with [] to an expression of type 'ISet<string>' -
i getting error 'cannot apply indexing [] expression of type 'iset''
for code snippet
foreach (gridviewrow grv in customtabledatalist.unigrid.gridview.rows) { if (grv != null) { if (null != grv.findcontrol(itemcheckboxid) && ((checkbox)grv.findcontrol(itemcheckboxid)).checked) { //at line getting error. itemids += customtabledatalist.unigrid.actionsid[rowcounter] + ", "; } rowcounter++; } }
can give more details resolve this.
add new using:
system.linq;
and change
foreach (gridviewrow grv in customtabledatalist.unigrid.gridview.rows) { if (grv != null) { if (null != grv.findcontrol(itemcheckboxid) && ((checkbox)grv.findcontrol(itemcheckboxid)).checked) { itemids += customtabledatalist.unigrid.actionsid.toarray()[rowcounter] + ", "; } rowcounter++; } }
Comments
Post a Comment