Solved

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

Posted on 2016-09-25
2
52 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
2 Comments
 
LVL 21

Accepted Solution

by:
Tapan Pattanaik earned 500 total points
Comment Utility
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
Comment Utility
Great answer. Thank you very much!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now