Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,
This is Ganesh,
I have a table with no primary key and it contains 40 fields and holding only one row.
My problem is how to bind these details to a GridView with Edit Opertaion.
and also i have to edit all the data in that table.

Can any one help me out.
Any help would be greatly appreciated.

Regards,
Ganesh Kumar
Posted
Updated 15-Apr-12 6:17am
v4

Its Easy...

Check in gridview enable editing is checked..
and when your editing done update the database so next time u get that edited data.

Best Regards
Kuldeep
 
Share this answer
 
Thanks for your reply
but the actual problem I'm facing is that my table contains 40 fields(columns) and how can i write/ mention each field in my source code.
And what about my update statement. I have to update each and every column in the grid.
And remember that my table doesn't have the PRIMARY KEY. And also in the edit mode of my gridview it has to show few dropdownlist's and one fileupload control and one listbox.

Is there any alternative way without mentioning the 40 fields in my source code.

Any help would be greatly appreciated.Thanks!!
 
Share this answer
 
Comments
Kuldeep B 15-Apr-12 13:41pm    
fields count is not issue.
when you call update method all edited data is updated
Kuldeep B 15-Apr-12 13:55pm    
Update--
Gridview1.Databind();
Nelek 15-Apr-12 18:29pm    
Please don't write solutions to give more information about your problem. You can use the "improve question" to add the information to your original message and/or click on "have a question or comment" to directly speak with the person you want to (he/she will get a notification), as we are doing right now with you.
Kuldeep B 16-Apr-12 8:51am    
Good Advice Nelek....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900