M
Manuel
I have a Datagrid with 9 elements. The problem is that when I sort the grid
by a column, it present more columns than there are.
This is my code for the ItemCreated event:
Private pNo As Integer = 0
Private Sub grd_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles grd.ItemCreated
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
Response.Write(Me.pNo & ",")
Me.pNo += 1
End If
End Sub
The first time I run the page it displays the list: 0,1,2,3,4,5,6,7,8,
But when I click one of the column headers to sort the grid I get the
following list: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,
Does anyone have an idea of what's happening here?
by a column, it present more columns than there are.
This is my code for the ItemCreated event:
Private pNo As Integer = 0
Private Sub grd_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles grd.ItemCreated
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
Response.Write(Me.pNo & ",")
Me.pNo += 1
End If
End Sub
The first time I run the page it displays the list: 0,1,2,3,4,5,6,7,8,
But when I click one of the column headers to sort the grid I get the
following list: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,
Does anyone have an idea of what's happening here?