|
-
Mar 11th, 2005, 05:32 AM
#1
Thread Starter
Lively Member
DataSet in Grid Format
Hi, i am new to ASP.NET.
How do i display display data in a grid format, with the use of datagrid, that it repeats the rows in data set in vertical and horizontal direction. it will look like this in html:
<table>
<tr>
<td>dataset Row1</td>
<td>dataset Row2</td>
<td>dataset Row3</td>
</tr>
<tr>
<td>dataset Row4</td>
<td>dataset Row5</td>
<td>dataset Row6</td>
</tr>
</table>
thanks!!!
-
Mar 11th, 2005, 05:39 AM
#2
Re: DataSet in Grid Format
Just bind the datagrid to the dataset.
VB Code:
dg1.DataSource = dsDataSet
dg1.DataBind()
-
Mar 11th, 2005, 08:59 AM
#3
Re: DataSet in Grid Format
 Originally Posted by mendhak
Just bind the datagrid to the dataset.
VB Code:
dg1.DataSource = dsDataSet
dg1.DataBind()
Mendhak, shouldnt it be binded to a DataTable(e.g dsDataSet.Tables[0]) instead of DataSet? Or will it show all the DataTable using a link, something like WinForm datagrid? I never tried it, so not sure.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Mar 12th, 2005, 04:52 AM
#4
Re: DataSet in Grid Format
No, the + thing happens in VB.NET only.
I think what I posted is right, but since you've posted, you've confused me. However, I'm just too lazy to open up vs.net and check, so I won't.
-
Mar 14th, 2005, 03:43 AM
#5
Thread Starter
Lively Member
Re: DataSet in Grid Format
Hi,
thanks for the reply.. but i think i'm clear abt describing my problem.. what i want to acheive is to display the rows in both direction.. what we usually get for the datagrid is that rows repeat vertically OR horizontally. so each of my rows in the datagrid will be displayed in one <td>.. so it will display as:
<table>
<tr>
<td>Row 1 ID<br>
Row 1 Description
</td>
<td>Row 2 ID<br>
Row 2 Description
</td>
<td>Row 3 ID<br>
Row 3 Description
</td>
</tr>
<tr>
<td>Row 4 ID<br>
Row 4 Description
</td>
<td>Row 5 ID<br>
Row 5 Description
</td>
<td>Row 6 ID<br>
Row 6 Description
</td>
</tr>
</table>
is that acheivable?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|