This is a migrated thread and some comments may be shown as answers.

How to cancel page changing

2 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 15 Dec 2008, 04:00 PM
I need to cancel page changing.

Paging is stopping, but page scroll not.
protected void grd_PageIndexChanged(object source, GridPageChangedEventArgs e)
        {           
            e.Canceled = true;
        }


2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Dec 2008, 09:37 AM
Hi Andrey,

You can set AllowPaging and AllowScrolling property to false if you dont need this features.

ASPX:
 <MasterTableView  DataKeyNames="ProductName"    AllowPaging="false"  DataSourceID="SqlDataSource1" > 
           

 <ClientSettings > 
    <Scrolling  AllowScroll="false" /> 
 </ClientSettings> 

Shinu.


0
Andrey
Top achievements
Rank 1
answered on 16 Dec 2008, 11:07 AM
I'am wrong. I have GridPagerMode.Slider, not scroll. Sometimes, I need to prevent page changing on server after pressing on slider. Is it possible? I cannot disable paging.
Tags
Grid
Asked by
Andrey
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Andrey
Top achievements
Rank 1
Share this question
or