Solved

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

Posted on 2011-03-10
2
253 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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

730 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