c# - Get subitem value in radlistview items -


here listview

<telerik:radlistview runat="server" id="lvallusers" width="30px">   <itemtemplate>     <table>       <tr>         <td >           <asp:checkboxlist id="cbid" runat="server" cssclass="item" font-size="15px" repeatdirection="horizontal">             <asp:listitem text="    "  > </asp:listitem>           </asp:checkboxlist></td>           <td style="padding-bottom:10px"><%# eval("firstname") %></td>           <td style="padding-bottom:10px"><%# eval("familyname") %></td>         </tr>       </table>     </itemtemplate>  </telerik:radlistview> 

how can checkboxlists item text @ code behind ? or how can firstname , familyname , code behind after binded data @ pageload? can't use

 foreach (telerik.web.ui.radlistviewitem item in lvallusers.items) {    var cb = item.findcontrol(index);  } 

because index equals id normally. in item template id not equal cbid. when item template iteratives, id changing. need firstname , familyname or checkboxlists item @ codebehind (c# not js). how can that?

i find solution. it's seems little long way works.

foreach (telerik.web.ui.radlistviewitem item in lvallusers.items) {     if (((system.web.ui.webcontrols.checkboxlist)(((system.web.ui.control)(item)).controls[1])).items[0].selected)     {         ccusernames.add(((system.web.ui.webcontrols.label)(((system.web.ui.control)(item)).controls[7])).text);     } } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -