Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in ASP .NET only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
ASP .NET
How can I add different columns with same name to gridview???
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Ajish Antony
New Member
Join Date:
Feb 2010
Posts:
3
#1
How can I add different columns with same name to gridview???
Feb 3 '10, 03:26 PM
I am using C#.Net as my language. I want to add some columns of same name to a grid view. How can I do it???
tlhintoq
Recognized Expert
Specialist
Join Date:
Mar 2008
Posts:
3532
#2
Feb 3 '10, 03:46 PM
Read about the gridview control in MSDN. Sample code and all.
GridView Class (System.Web.UI.WebControls)
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview(VS.80).aspx
Displays the values of a data source in a table where each column represents a field and each row represents a record. The GridView control enables you to select, sort, and edit these items.
Comment
Post
Cancel
Frinavale
Recognized Expert
Expert
Join Date:
Oct 2006
Posts:
9749
#3
Feb 8 '10, 03:56 PM
You cannot add different columns with the same name to a GridView.
You have to give each column a unique name.
What are you trying to accomplish?
-Frinny
Comment
Post
Cancel
Ajish Antony
New Member
Join Date:
Feb 2010
Posts:
3
#4
Feb 11 '10, 11:14 AM
Thank you all for your help.
I managed it by using a space(" ") with the column name. Now it is working properly.
Thanks to everyone.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment