Solved

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

Posted on 2012-03-28
6
237 Views
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.

Thanks
0
Comment
Question by:KavyaVS
6 Comments
 
LVL 11

Assisted Solution

by:rajvja
rajvja earned 100 total points
ID: 37776552
Hi,

    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
0
 
LVL 16

Accepted Solution

by:
MikeMCSD earned 100 total points
ID: 37776586
0
 
LVL 20

Assisted Solution

by:BuggyCoder
BuggyCoder earned 300 total points
ID: 37776685
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:KavyaVS
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.

Thanks
0
 
LVL 20

Assisted Solution

by:BuggyCoder
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.
0
 

Author Closing Comment

by:KavyaVS
ID: 37792929
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

16 Experts available now in Live!

Get 1:1 Help Now