?
Solved

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

Posted on 2011-03-10
2
Medium Priority
?
260 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
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

807 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