saurabh goyal
saurabh goyal

Reputation: 1744

Disable postback in paging (gridviewcontrol)

I have a GridView with paging enabled. When I select a different page in the GridView control, it causes a postback. Because of that my binding of data doesn't occur.

How is it possible to disable postback in paging?

Upvotes: 1

Views: 1785

Answers (2)

Kushal Shah
Kushal Shah

Reputation: 55

Do not forget to include your Page Load code inside

if (!IsPsotBack)
{}

So that will not be executed on postback fired from grid's paging event

Upvotes: 0

Pranay Rana
Pranay Rana

Reputation: 176934

Its not possible to do the paging with out pager on grid view, and to do paging you need to postback page.

If you dont want pager than remove it by Setting AllowPagaing= false property in gridview control.

Upvotes: 1

Related Questions