Click here to Skip to main content
15,905,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I want to merge the repated columns of datagridview in the following way


Line 1 | Line 2 |
A |B | C A |B | C....



I want to do it in less code beacuse I have already done much code to format the Datagridview which causes slow loading of girdview.


Please Hlp..


Thanks in advance
Posted

1 solution

You can do this in simple way from sql select qyery...


SQL
SELECT isnull(Column1,'') + cast(Column2 as nvarchar(10)) as GridColumnName from TableName


Now if u bind grid and give data source then there are only one column having name
GridColumnName .
 
Share this answer
 
Comments
shoaib Naeem 8-Jul-13 3:03am    
Sorry Its look like this

Line 1 | Line 2 |
A1 |B1 | C1 A2 |B2 | C2 ....
Nirav Prabtani 8-Jul-13 3:05am    
you have to do this be analyse your need and datafields...:)
Sadique KT 8-Jul-13 3:06am    
What is Line1 and Line? column Headers? and A1, B1 etc????
shoaib Naeem 8-Jul-13 3:15am    
Hello Sir

Plz see this link
http://csharpdotnet2012.blogspot.in/2012/02/v-behaviorurldefaultvmlo.html

I want to merge column headers

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