Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Pls some one tell that how to show data in gridview column wise, is it possible by datatable, then Pleasse someone tell to show data in gridview column wise.


thanks
Posted
Comments
Deepthi Aravind 7-Jun-11 2:46am    
You want t o bind data coming from datatable to grid view???

Check this link.

Bind Gridview[^]
 
Share this answer
 
You mean row by row programatically ?

DataTable yourDataTable=null;

//Fill your data table here

yourDataTable = new DataTable();
// do something here to fill the data

//Bind to gridView

yourGridView1.DataSource= yourDataTable();
yourGridView1.DataBind();

Every DataRow in your data table corresponds to your GridView Row , bear in mind you have to use Binding expressions such as Eval
 
Share this answer
 
Hope this[^] might help you.
 
Share this answer
 

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