26. May 2008 14:58
/
xiquinho
/
/
Comments (0)
Protected Sub MyGridView_RowCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.Pager Then
Dim space As New LiteralControl(" ")
Dim lb As New LinkButton()
lb.ID = "ViewAllLinkButton"
lb.Text = "View All"
lb.SkinID = "ProfessionalGridViewPagerViewAll"
AddHandler lb.Click, AddressOf ViewAllLinkButton_Click
' Pager is rendered in a single cell as a table;
' each page # is in a cell by it's own
Dim table As Table = TryCast(e.Row.Cells(0).Controls(0), Table)
' Add ViewAll linkbutton to the last cell
Dim parentCell As TableCell = table.Rows(0).Cells(table.Rows(0).Cells.Count - 1)
parentCell.Controls.Add(space)
parentCell.Controls.Add(lb)
End If
End Sub
Protected Sub ViewAllLinkButton_Click(ByVal sender As Object, ByVal e As EventArgs)
GridView1.AllowPaging = False
End Sub
5797625a-7ebe-4be7-a0ae-bd3995b56338|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
20. April 2008 20:47
/
xiquinho
/
/
Comments (0)
Sub OnSelectedHandler(ByVal source As Object, ByVal e As SqlDataSourceStatusEventArgs)
Dim gridViewTotalCount As Integer
gridViewTotalCount = e.AffectedRows
Label1.Text = gridViewTotalCount
End Sub
DataSource OnSelected="OnSelectedHandler"
fb85ced0-1b55-411d-b6d7-d780e958dc8c|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04