javascript - How to get gridview column values which are visible false -


in grid-view setting template field , item template visible false..

but when running lop in java-script skipping column.

please help

i did below

    <asp:templatefield>                             <itemtemplate>                                 <asp:label runat="server" id="lblwrdcd"  style="display:block" text='<% #eval("wrdcd") %>'></asp:label>                             </itemtemplate>                         </asp:templatefield >                         <asp:templatefield>                             <itemtemplate>                                 <asp:label runat="server" style="visibility:hidden" id="lblwingcd" text='<% #eval("wingcd") %>'></asp:label>                             </itemtemplate>                         </asp:templatefield>                         <asp:templatefield>                             <itemtemplate>                                 <asp:label runat="server" style="visibility:hidden" id="lblbedtypcd" text='<% #eval("bedtypcd") %>'></asp:label>                             </itemtemplate>                         </asp:templatefield> 

and in javascript below

                      var table = document.getelementbyid("<%=gddetails.clientid%>");                       var row = table.rows[1];                       alert(row.cells[1].innertext);                       alert(row.cells[2].innertext);                       alert(row.cells[3].innertext); 

but still not working

    <asp:label id="lblbookid" runat="server" text='<%#eval("bookid")%>' visible="false"></asp:label>     <asp:hiddenfield id="hiddenid" runat="server" value='<%#eval("bookid")%>'   /> 

we can't access visible=false in client-side ..but passing value hiddenfield can use....


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -