Solved

ASP.net 2015 Add TextBox Column to GridView for Data Entry

Posted on 2016-09-25
2
106 Views
Last Modified: 2016-09-26
Hi

I have a bound GridView that has a few template columns. I need to add an extra  template for data entry by the user.
It is to enter a numeric quantity. I tried markup like that below but "TextBox" was not recognized. While this may have worked
in previous versions of Visual Studio, it does not work inn 2015

<ItemTemplate>

<asp:TextBox ID="tbQty" runat="server" Width="25px"

MaxLength="3" />

</ItemTemplate>
0
Comment
Question by:murbro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Tapan Pattanaik earned 500 total points
ID: 41814866
Hi murbro,

Please paste the below code and let me know. It is working for me in  2015 visual studio.

        <asp:TemplateField HeaderText="Qty">
         <ItemTemplate>
             <asp:TextBox ID="tbQty" runat="server" Width="25px" MaxLength="3" />
         </ItemTemplate>
        </asp:TemplateField>

Open in new window

Regards,
Tapan Pattanaik
0
 

Author Closing Comment

by:murbro
ID: 41815532
Great answer. Thank you very much!
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Learning About The VB.NET TableLayoutPanel Control 5 42
Help with Report Viewer in VS2013 6 33
Datagridview column resizing 8 28
Difference between Highcharts and Mapbox 10 44
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question