D
David
I'm trying to split a datagrid after 30 rows and I dont want to use it
for paging purposes so please dont suggest the PageSize="30" option.

--------------------------------------------------------------------------
This is one of my first thoughts but of course it doesnt work or else
I wouldnt be here asking for help. Thanks
--------------------------------------------------------------------------
Im using a SQL call
sqlString = "SELECT * FROM Table"
Dim sqlDataAdapter As New SqlClient.SqlDataAdapter(sqlString,
sqlConnection)
Dim Ds As New DataSet()
sqlDataAdapter.Fill(Ds, "table")
With Ds.Tables(0).Rows
If .Count > 30 Then
Dim numPages = .Count / 30
For i = 1 To -(Int(-numPages))
With Datagrid1
.DataSource = Ds
.DataMember = "table"
.DataBind()
End With
Response.Write("<br>")
Next
Else
With Datagrid1
.DataSource = Ds
.DataMember = "table"
.DataBind()
End With
End if
End With
--------------------------------------------------------------------------
Im look for the following affect
Datagrid1
----------------------------------------------
| Header | Header | Header | Header | Header |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |
for paging purposes so please dont suggest the PageSize="30" option.
--------------------------------------------------------------------------
This is one of my first thoughts but of course it doesnt work or else
I wouldnt be here asking for help. Thanks
--------------------------------------------------------------------------
Im using a SQL call
sqlString = "SELECT * FROM Table"
Dim sqlDataAdapter As New SqlClient.SqlDataAdapter(sqlString,
sqlConnection)
Dim Ds As New DataSet()
sqlDataAdapter.Fill(Ds, "table")
With Ds.Tables(0).Rows
If .Count > 30 Then
Dim numPages = .Count / 30
For i = 1 To -(Int(-numPages))
With Datagrid1
.DataSource = Ds
.DataMember = "table"
.DataBind()
End With
Response.Write("<br>")
Next
Else
With Datagrid1
.DataSource = Ds
.DataMember = "table"
.DataBind()
End With
End if
End With
--------------------------------------------------------------------------
Im look for the following affect
Datagrid1
----------------------------------------------
| Header | Header | Header | Header | Header |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |
----------------------------------------------
| 234 | 234232 | 56 | 2342 | 2345 |