D
Dirk Vervecken
I'm currenty using a datagrid that contains 3 linkbuttons. With use of
the property Builder in VS, i've also allowed for the use of Paging.
But everything is going haywire. On the first page everything works as
it should. I can even go to the next page without any problems.
However, when I press the button to go back to the previous page,
it instead give me the function for the first linkbutton.
Also, if I try to use any of the linkbuttons at that time, I get
all the wrong values. I get instead, the values from the first page.
Each of the three linkbuttons triggers the ItemCommandEvent
Pushing the Next-Button triggers a PageIndexChangedEvent
The Previous Button gets the commandname of the first Linkbutton in
the Grid.
private void dgBudgetRider_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{ //The Pageindex is set to the new Index
dgBudgetRider.CurrentPageIndex = e.NewPageIndex;
//Grid
UnSelectie(); <- Sets the SelectedIndex to -1.
//Vorige waarde
ViewState.Remove("SelectedCode");
dgBudgetRider.DataBind();
}
Can anyone help me?
the property Builder in VS, i've also allowed for the use of Paging.
But everything is going haywire. On the first page everything works as
it should. I can even go to the next page without any problems.
However, when I press the button to go back to the previous page,
it instead give me the function for the first linkbutton.
Also, if I try to use any of the linkbuttons at that time, I get
all the wrong values. I get instead, the values from the first page.
Each of the three linkbuttons triggers the ItemCommandEvent
Pushing the Next-Button triggers a PageIndexChangedEvent
The Previous Button gets the commandname of the first Linkbutton in
the Grid.
private void dgBudgetRider_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{ //The Pageindex is set to the new Index
dgBudgetRider.CurrentPageIndex = e.NewPageIndex;
//Grid
UnSelectie(); <- Sets the SelectedIndex to -1.
//Vorige waarde
ViewState.Remove("SelectedCode");
dgBudgetRider.DataBind();
}
Can anyone help me?