Questions tagged [page-index-changed]

PageIndexChanged occurs when one of the pager buttons is clicked, but after the GridView control handles the paging operation

The PageIndexChanged event is raised when one of the pager buttons is clicked, but after the GridView control handles the paging operation. This enables you to provide an event-handling method that performs a custom routine, such as a custom paging operation, whenever this event occurs.

To determine the index of the page selected by the user, use the PageIndex property of the GridView control.

When the paging feature is enabled (by setting the AllowPaging property to true), use the PageIndex property to determine the index of the currently displayed page. You can also use this property to programmatically change the displayed page.

72 questions
26
votes
5 answers

PageIndexChanging in GridView in ASP.NET

I have a gridview which I am using to display a dataset result. The problem is I am using paging in it. But when I click on the page # it says that I haven't handled the event. Do I need to rebind the dataset??? Thanks
JCTLK
  • 2,145
  • 8
  • 29
  • 37
14
votes
5 answers

The GridView 'GridView1' fired event PageIndexChanging which wasn't handled

I have created: one master page and one content page called Detail. On Button click event, displaying data in grid view. In grid view, columns are autogenerated. I wanted to show 11 column in grid view, but it is more than page size. What to do…
Jui Test
  • 2,399
  • 14
  • 49
  • 76
13
votes
6 answers

The GridView fired event PageIndexChanging which wasn't handled

i have allowed paging and added the below codes but got the error. Does anyone know what could be the problem? Code: protected void SubmitAppraisalGrid_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { …
user1037134
10
votes
4 answers

'GridView1' fired event PageIndexChanging which wasn't handled

I am using a gridview and I want to use paging. I have already set allow paging to true and page size to 5. I can see the numbers at the base of my gridview, but when i click on a number to move to respective page, it throws an error saying: The…
Robin Agrahari
  • 807
  • 3
  • 11
  • 24
5
votes
3 answers

DataPager EventArgs

I'm using a DataPager control in my silverlight application. I have different pagers for different DataGrids and want to use the same event handler for the PageIndexChanged event for all of them. The delegate must take an EventArgs object as an…
PhilBrown
  • 2,949
  • 7
  • 34
  • 53
5
votes
2 answers

Using SqlDataAdapter to page a SqlDataReader source

This question seems to be common and I went through this answer already. Unfortunately, my page still isn't being paged. Here's what my code looks like in C#: SqlCommand command = new SqlCommand("(SELECT ......", Connection); SqlDataAdapter…
Kevin
  • 3,209
  • 9
  • 39
  • 53
5
votes
2 answers

gridview paging is not working

I have a gridview control, however, when I click the page number, I get an error "Page not found". What am I missing here? My code is:
DNR
  • 3,706
  • 14
  • 56
  • 91
3
votes
2 answers

Get GridView Object from Sender

I have multiple GridView on a page, and they are all pagable. I need to handle the paging in OnPageIndexChanging event, but I'd rather not write the same code for each GridView. So how can I get the GridView object id from the sender? I'm trying to…
Stuart
  • 1,544
  • 5
  • 29
  • 45
3
votes
1 answer

Gridview PageIndexChanging event not firing

I hav a gridview inside a usercontrol
None
  • 5,582
  • 21
  • 85
  • 170
2
votes
3 answers

Paging in gridview

My gridView:
YProgrammer
  • 855
  • 3
  • 8
  • 14
2
votes
2 answers

GridView PageIndexChanging Not Working

This seems to be an easy question to ask, but I am not able to show items in GridView. Here is my code: public partial class TestList : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if…
RG-3
  • 6,088
  • 19
  • 69
  • 125
2
votes
2 answers

add pagination to gridview asp.net

what i want to happen is to have a pagination to have a clean look at the data. here is my html code for gridview: and code behind: public…
Paolo Duhaylungsod
  • 487
  • 1
  • 7
  • 25
2
votes
1 answer

PageIndexChanging of a GridView that is inside another GridView

I am doing a project in asp.net 3.5 (c#) where I have used a GridView inside another GridView. The problem, however, is that I dont know how to use the PageIndexChanging Event for the Child GridView.. Anyone with a solution please help me..!! Thanks…
2
votes
0 answers
1
vote
4 answers

Error in Gridview application

When trying to use the paging part of GridView in my application, I receive the following error: The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
mohammad reza
  • 3,292
  • 6
  • 29
  • 39
1
2 3 4 5