Solved

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

759 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

20 Experts available now in Live!

Get 1:1 Help Now