DropDownList In GridView (CRUD) Operation and Hide Row in Girdview

No.of Views1703
Bookmarked0 times
Downloads 
Votes0
By  usamawahabkhan   On  10 May 2010 01:05:14
Tag : ASP.NET , Grid Controls
Update , Copy ,Record, Delete (CRUD) Operation Gridview in asp.net Programmability
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

Update , Copy ,Record, Delete (CRUD) Operation Gridview in asp.net Programmability is little bit difficult  but its just a few techniques game and nothing else that like how to access edit values,add control in gridview and with data hide columns in girdview on runtime but  column value should acesable and manymore. now in this totrial i will tell how to preform  Update , Copy ,Record, Delete (CRUD) Operation Gridview just few steps and you will do it by your self.
 

Image Loading

Step by Steps

Image Loading

1 drag gridview on your form and autgeneratecolumn properties set to false
 

Image Loading

2 add 4 Column type column 1,2 : boundedfield set there header and bindvalue col1 = Productid and cal2 = Productname and add 3rd column TemplateField type , 4th column command type checked update checkbox .

 

Image Loading

3 edit columns 1,2 and command columns convert on TemplateField

 

Image Loading

4 . click on gridview flag and edit template there you will see 4 columns in column 0 you have add dropdownlist .


5 select templatefooter in edittemplate add textbox in productname , dropdownlist in colum0 and label control in column productID endedittempalte


6 add database in aap_data folder form sample code


7 right click on girdview goto properties and fire three event 1 rowCreated, Rowupdateing,rowediting and past code give in sample code ;

 

Image Loading

8 add some css tag in header to hide productid

That's all.enjoy

Sample Project Source

Download source files -41 kb

 
Sign Up to vote for this article
 
About Author
 
usamawahabkhan
Occupation-Not Provided
Company-Not Provided
Member Type-Senior
Location-Pakistan
Joined date-06 May 2010
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top