Display multiple columns in Gridview from One Column of SQL table
-
I have one column(like 1 to 100 values)in table. 1 2 3 4 5 . . ... Now I need to Display multiple columns in Gridview like 1 6 ... 2 7 3 8 4 9 5 10
-
I have one column(like 1 to 100 values)in table. 1 2 3 4 5 . . ... Now I need to Display multiple columns in Gridview like 1 6 ... 2 7 3 8 4 9 5 10
Where will your data come from? How will you match it to the first column? You could populate the stored procedure according to your needs with a column containing the appropriate data from within the database (where data should be handled) and then bind that to the grid.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me
-
I have one column(like 1 to 100 values)in table. 1 2 3 4 5 . . ... Now I need to Display multiple columns in Gridview like 1 6 ... 2 7 3 8 4 9 5 10
It would be better to use
datalist
to do that.DataList
is actually made to handle such scenarios. Set thedatalist
Datasource
to thedatatable
containing this data. Set therepeatdirection=vertical
.repeatlayout=table
andrepeatcolumns=2
. Thats it you have what you want.Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
-
It would be better to use
datalist
to do that.DataList
is actually made to handle such scenarios. Set thedatalist
Datasource
to thedatatable
containing this data. Set therepeatdirection=vertical
.repeatlayout=table
andrepeatcolumns=2
. Thats it you have what you want.Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
Better option is to use of
Datalist
..Datalist
fullfills your requirement without any efforts. -
I have one column(like 1 to 100 values)in table. 1 2 3 4 5 . . ... Now I need to Display multiple columns in Gridview like 1 6 ... 2 7 3 8 4 9 5 10
Better option is to use of Datalist..Datalist fullfills your requirement without any efforts.