?
Solved

Is it possible to use a gridview with textboxes in all rows?

Posted on 2011-03-10
2
Medium Priority
?
256 Views
Last Modified: 2012-05-11
I have a project that requires me to allow a user to update 24 rows and 20 columns at one time. This is based on the hours in the day. However, the user does not wat to press an edit button on each record. an example is a spreadsheet with 24 rows. each row has eight 20 columns. each column needs to be filled with data. I would like to have text boxes for each column in every row. Can this be done without tables? if so, please provide a code sample.

Thanks.
0
Comment
Question by:bschave2
[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 9

Expert Comment

by:mayank_joshi
ID: 35106336
You can use textbox in  template field in gridview to do that.

0
 
LVL 9

Accepted Solution

by:
gery128 earned 2000 total points
ID: 35108638
yeah, as suggested by Mayank_joshi correctly, you can always use template field: just like this:
<asp:TemplateField HeaderText="City" SortExpression="City">
        <ItemTemplate>
           <asp:TextBox runat="server" ID="txtCityEdit" Text='<%# Eval("City") %>'></asp:Label>
        </ItemTemplate>
  </asp:TemplateField> So user will directly be presented with textbox and values filled in. but he still need to click on some button (update command) to update it to database.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Suggested Courses

765 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