Computer Software

eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 
eg: UK or Brides UK or Classical Art or Buy Music or Spirituality
 
Business & Money
Technology
Women
Health
Education
Family
Travel
Cars
Entertainment
Featured Sites
SD Editorials
Online Guide and article directory site.
Foodeditorials.com
Over 15,000 recipes & editorials on food.
Lyricadvisor.com
Get 100,000 Lyric & Albums.

Video on Gridview In Edit Mode

    View: 
Similar Videos
Videos on Making A Website Html
Videos on Making Books With Children
Videos on Making Games In Flash
Videos on Making Money For Free Online
Videos on Making Money On The Side
Videos on Malware And Spyware Remover
Videos on Manage Your Own Business
Videos on Management And Consulting Services
Videos on Management Consulting In India
Videos on Management Of Information Services
Videos on Management Of Software Development
Videos on Management Software Microsoft Project
Videos on Manual And Automated Testing
Videos on Manufacturing Enterprise Resource Planning Software
Videos on Manufacturing Software Small Business
Videos on Mapping Software For Gps
Videos on Market Technical Analysis Software
Videos on Marriage Questions To Ask
Videos on Master Electrician Exam Prep
Videos on Max Secure Spyware Detector
 
Youtube
DropDownList in edit mode on a...
Youtube
ASP.NET Gridview, dropdownlist...
Gridview In Edit Mode
Dave Bush
Here's the problem. You want to be able to edit all of the rows in the gridview at once instead of having to switch to edit mode and save one row at a time. Normally, you'd want to do this when only a couple of items need to be changed per row and not the entire row's worth of data.
You can do this easily if you make the columns that need to be edited templated columns and place editable controls in them (checkbox, textbox, etc). You can then either make these controls ?AutoPostback? controls, or you can provide a control at the bottom of the screen that triggers the update. In either case, the code you are going to write at the codebehind level is going to be the same.
For this example, we are going to assume that you only have one column that needs to be updated and that the control is a checkbox control.
One of the issues you are going to run into with this is that you'll need to know which row is associated with the control when it is updated. The easiest way I've found of dealing with this problem is by adding a HiddenField control and databinding the row Id to it. Since we are dealing with a CheckBox control, you will need to create an event handler for the Checked event. The first parameter that will be passed into this event handler will be the sender. Sender represents the control that fired the event. In this case, it will represent the CheckBox control.
The other control you'll need to retrieve is the HiddenField control that you placed next to the check box. You can retrieve this control by using the FindControl() method that is hanging off the parent control of the check box. Assuming your HiddenField control is named ?_hiddenFieldId? you can get the ID by using:
string id = (HiddenField)(((CheckBox)(Sender)).Parent.
FindControl(?_hiddenFieldId?)).Text;
Now that you have the value of the ID and the value of the checkbox, you can update your database.
del.icio.us Tags: asp.net , gridview
Technorati Tags: asp.net , gridview
Next Paragraph..
A Guide to Business | Guide to Technology | Guide to Women | Guide to Health | Family Guide to | Travel & Vacations | Information on Cars

EditorialToday Computer Software has 2 sub sections. Such as Software and All Microsoft Softwares. With over 20,000 authors and writers, we are a well known online resource and editorial services site in United Kingdom, Canada & America . Here, we cover all the major topics from self help guide to A Guide to Business, Guide to Finance, Ideas for Marketing, Legal Guide, Lettre De Motivation, Guide to Insurance, Guide to Health, Guide to Medical, Military Service, Guide to Women, Pet Guide, Politics and Policy , Guide to Technology, The Travel Guide, Information on Cars, Entertainment Guide, Family Guide to, Hobbies and Interests, Quality Home Improvement, Arts & Humanities and many more.
About Editorial Today | Contact Us | Terms of Use | Submit an Article | Our Authors