?
Solved

Gridview - Force into edit mode?

Posted on 2007-04-10
7
Medium Priority
?
1,566 Views
Last Modified: 2008-01-09
I have a gridview and need to force it into edit mode on page load - how is this done?
0
Comment
Question by:tbaseflug
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18882628
Ok, now I am a bit confused. Do you want to force the gridview to be in edit mode for every line that is in the gridview? Or do you want it to open with the last row in edit mode, or a new row in edit mode...

For the first option, I'd say you're out of luck. Gridview is just not made for that, unless you make your own. Second could be possible as could be the third..

Regards,
Max.
0
 

Author Comment

by:tbaseflug
ID: 18882640
Correct - I am looking for the 1st - want to the Gridview to open in in multi-row edit mode - so that all rows are editable
0
 
LVL 4

Expert Comment

by:CBeach1980
ID: 18882689
To have a gridview in multi-row edit mode you could create a new gridview with TemplateColumns that have textboxes in the ItemTemplate and then on save you'd need to loop through all the textboxes to get the values.  You could then have a display version of your gridview that just uses Labels.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:tbaseflug
ID: 18882761
There is no way - on page load or something, to force the gridview from display into edit?
0
 
LVL 4

Expert Comment

by:CBeach1980
ID: 18882810
You can force it into edit mode for a single row but not for the entire grid.  Gridviews are designed to only have one row editable at a given time.  To force a single row you set GridView.EditIndex to the row you want to edit before you databind.
0
 
LVL 19

Accepted Solution

by:
DreamMaster earned 2000 total points
ID: 18883909
Like I said, for option number one you are out of luck, unless you create your own gridview derived from the original, that would allow for such a thing. The gridview is designed for displaying data, and editing one row at the same time. It isn't even designed for inserting rows, although that can be overcome quite easily.

So you are left with the option of either altering the gridview to suite your needs, or accepting the fact that the standard gridview is not designed for full editting capabilities.

Regards,
Max.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18884513
Glad to have been helpful :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

762 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