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
Post a Comment