Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ItemCommand and dodefault (vfp)
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00757579
Message ID:
00757666
Views:
13
Hi Robert,

Are you handling the PageIndexChanged event? Put code in this event to handle the page changing like the following:
Private Sub dgrCustomers_PageIndexChanged(ByVal source As Object, _
   ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) _
   Handles dgrCustomers.PageIndexChanged
    ' Runs when one of the pager controls is clicked

    'Update the current page number from the parameter values
    dgrCustomers.CurrentPageIndex = e.NewPageIndex

    'Recreate the DataSet and bind it to the DataGrid control
    BindDataGrid()
End Sub
>Hello!
>
>I've one question is there a way I can tell my app to run the basic code and not my written code?
>for example:
>
>    Private Sub myGrid_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles myGrid.ItemCommand
>        If e.CommandName = "gridSelect" Then
>            Me.TextBox1.Text = e.Item.Cells(1).Text
>            Me.TextBox2.Text = e.Item.Cells(2).Text
>            Me.myCombo.SelectedItem.Text = e.Item.Cells(3).Text
>            Me.TextBox3.Text = e.Item.Cells(4).Text
>            Me.Textbox4.Text = e.Item.Cells(5).Text
>            Me.RadioButtonList1.Items.Item(1).Selected = True
>        End If
>    End Sub
>
>in this case I've added a Linkbutton to a datagrid (commandname="gridselect"). Later I've added Paging to the datagrid.
>
>my problem is now that the paging letters (1,2,...) do not response to my clicks. But when I remove my code (see above) everything works fine. Therefore I think that I should write an ELSE-part with sort of Dodefault() as it's called in VFP.
>
>Thanks for your help!
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform