c# - Add TextBox in GridView at specific column? -
i have gridview:
<fieldset class="loadedform">                 <legend>od</legend>                 <asp:gridview id="grv_od" runat="server" autogeneratecolumns="false" datakeynames="lbpr_id"                     onpageindexchanging="grv_od_pageindexchanging" onrowdatabound="grv_od_rowdatabound">                     <columns>                         <asp:templatefield>                             <itemtemplate>                                 <asp:checkbox id="chk_items" runat="server" />                             </itemtemplate>                         </asp:templatefield>                         <asp:boundfield datafield="lbpr_id" visible="false" />                         <asp:boundfield datafield="lbpr_name" />                         <asp:boundfield datafield="lbpr_parentid" visible="false" />                     </columns>                 </asp:gridview>             </fieldset>   i want add textbox column in gridview @ specific column. when bound gridview this:
if flag bit equal 1    then field comment , have place textbox column in gridview row. don't have idea problem? follow picture hoping explain correctly: want display textbox column in gridview @ specific column when checked corresponding check box.
use template field add textbox gridview.
 <asp:templatefield>        <itemtemplate>             <asp:textbox runat="server" id="textbox1"></asp:textbox>         </itemtemplate>  </asp:templatefield>   if want check value , manipulate gridview based on value. can in rowdatabound event of gridview
Comments
Post a Comment