|
-
Jun 14th, 2004, 03:26 PM
#1
Thread Starter
Fanatic Member
Datagrid tricks...please help
I got the data in my datagrid, now I have paging setup, but when I page to the next sheet, it doesn't want to go, it stays on the first page. What am I missing??
Also, I'd like to be able to select a row by clicking anywhere, I use to do it by making a LinkButton in the first column (0) and pasting this code:
Private Sub dgRecs_ItemDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
Dim itemType As ListItemType = e.Item.ItemType
If ((itemType = ListItemType.Pager) Or _
(itemType = ListItemType.Header) Or _
(itemType = ListItemType.Footer)) Then
Return
Else
Dim button As LinkButton = _
CType(e.Item.Cells(0).Controls(0), LinkButton)
e.Item.Attributes("onclick") = _
Page.GetPostBackClientHyperlink(button, "")
End If
End Sub
Only its not working anymore after I made some changes. Is there another way? Thanks again guys!!!!
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
|