c# - Gridview generate extra column on left -


i using asp.net c#.i have following code code working fine.but problem gridview generate 1 column on left.

<asp:gridview width="96%" cssclass="grdclass" id="grd"     runat="server" autogeneratecolumns="false" datakeynames="stat_id">         <alternatingrowstyle backcolor="#ffcc99" />         <columns>             <asp:templatefield>                 <headertemplate>                     <th scope="col">الهاتف</th>                 </headertemplate>                 <itemtemplate>                     <td class="row_style">                         <div class="row_style">                             <%#eval("phone_num") %>                         </div>                     </td>                 </itemtemplate>             </asp:templatefield>         </columns>         <emptydatatemplate>no record found</emptydatatemplate>         <headerstyle backcolor="aquamarine" />         <rowstyle backcolor="#ffffcc" /> </asp:gridview> 

please check above code , guide me mistake or how can rid of problem.

you don't need put table element definitions inside grid view, this:

          <columns>                 <asp:templatefield>                     <headertemplate>                         الهاتف                     </headertemplate>                     <itemtemplate>                         <div class="row_style">                             <%#eval("phone_num") %>                         </div>                     </itemtemplate>                 </asp:templatefield>             </columns> 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -