473,388 Members | 1,340 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

How can I add different columns with same name to gridview???

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???
Feb 3 '10 #1
3 2713
tlhintoq
3,525 Expert 2GB
Read about the gridview control in MSDN. Sample code and all.
http://msdn.microsoft.com/en-us/libr...ew(VS.80).aspx
Feb 3 '10 #2
Frinavale
9,735 Expert Mod 8TB
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
Feb 8 '10 #3
I managed it by using a space(" ") with the column name. Now it is working properly.
Thanks to everyone.
Feb 11 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: srinivas | last post by:
Hi, I have binded a dataset to a gridview control at run time. I'm fetching 5 columns from the database. But while displaying it on the screen i want to show only 3 columns. I tried with...
7
by: rockdale | last post by:
Hi, How do you guys deal with the different clinet resolution? For example, you have 800*600, 1024*768 and 1280*1024 on client side. We used to put everything into a table with fixed width (the...
2
by: Jacksm | last post by:
How can I align an asp:table columns with gridview columns (the widths)? I have tried setting table.column(0).width = gridview.column(0).width at page_load but it doesn't work. Thanks in advance
2
by: =?Utf-8?B?Z2FuZQ==?= | last post by:
Hi, In a gridview, How can i display different columns between item and edit modes. For eg. i have a sql that returns productname, categoryname, etc. In viewmode, i need to display only...
3
by: Fritz the Cat | last post by:
Hi I have a long column of data. I'd like that to wrap into 5 columns, like a newspaper article how to do? thanks
3
by: nguyenlh | last post by:
code: I have read a example :The use girdview without datasource <asp:GridView AutoGenerateColumns="false" ID="GridView1" runat="server" OnRowCancelingEdit="GridView1_RowCancelingEdit"...
1
by: jimmysjams | last post by:
I'm modifying someone else's code and I have hit a snag. I don't want to rewrite what's already there but I might have to. I have a gridview, in the gridview is a set number of columns that...
1
by: neobonzi | last post by:
Hello! I'm dynamically creating a GridView bound to a datatable using custom template columns using the following method: protected void ShowGrid(DataTable dt) { ...
0
by: Andy B | last post by:
I have a GridView with a LINQDataSource attached to it. My code in the aspx markup is below. I need to know why only the checkbox field for the activated column is getting updated (the...
2
by: Ralf | last post by:
I have a custome request to print a gridview with lots of columns, 31 to be exact. I know how to print out a gridview, done it already for a GV with 6 columns. But, this GV is very wide and will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.