Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a grid which displays autogenerated columns.i want to change the order of columns before grid is binded.For example the order of columns which it by default fetches from database is Col1 col2 col3 etc...But i want to display it as Col2 col3 Col1.How can i do this? Also I want to combine two columns and show it as single column for ex.
col|col2 should be displayed as 'From col1 to col2' under a single column.
Posted
Comments
[no name] 26-Nov-13 7:27am    
where is your query?
ZurdoDev 26-Nov-13 7:28am    
Sounds like you do not want autogenerated columns. You should either change your sql or just add your columns instead of doing autogenerated.
pwavell 26-Nov-13 7:35am    
select min(slno),max(slno),date from table1.
I want to display it as 'From min(slno) to max(slno)' as one single column but in front end.
pwavell 26-Nov-13 7:55am    
i m binding my gridview based on three different conditions and each time it fetches different number of columns also some new columns are new too.is it possible to add columns dynamically from code behind?
JoCodes 26-Nov-13 8:24am    
You should consider not using autogenerated columns .Instead go for dynamically adding gridview columns since you want different columns based on conditions...

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