How to make the GridView editable with a button on the page

Posted on 2012-03-28
Last Modified: 2012-08-14
My aspx page has Table declared in it.In the page load event I am dynamically populating the Table  with Table cells and Table Cells with GridViews.
I added a Button on the page. When the user clicks the button dynamcally populated gridviews should be editable. How to do this.

Question by:KavyaVS
LVL 11

Assisted Solution

rajvja earned 100 total points
ID: 37776552

    At a time you can edit only one row in a gridview. What do you mean by editable by clicking a button?

GridView.Disabled = True/False
LVL 16

Accepted Solution

MikeMCSD earned 100 total points
ID: 37776586
LVL 20

Assisted Solution

BuggyCoder earned 300 total points
ID: 37776685
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

ID: 37776811
Hi rajvja,
Yes, at a time we can edit only one row in a gridview.

I have a button outside the grid.When the user clicks on that button the Grid columns should be enabled. So the user can chnage the values.
I tried GridView.Enabled = true but it is not working. The gridview columns are still disabled.

Please give me any suggestions.

LVL 20

Assisted Solution

BuggyCoder earned 300 total points
ID: 37776913
Set the EditIndex property to the appropriate row and then ReBind the GridVIew again to it's DataSource.  Hope this helps.

Author Closing Comment

ID: 37792929

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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