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

Strange Behavior with Paging and NeedDataSource

1 Answer 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Craig Hinkel
Top achievements
Rank 1
Craig Hinkel asked on 22 Jan 2009, 04:33 PM
I am experiencing strange behavior when using NeedDataSource and paging. Basically, I have a search button on my page and when the user searches more than once, it will return page index 0 the first time, 1 the second time, and so on. I could easily just set the CurrentPageIndex property everytime a search takes place, but I want to make sure this is expected behavior from telerik.

        protected void Page_Init(object sender, EventArgs e)  
        {  
            if (Page.IsPostBack)  
            {  
                grdUsers.NeedDataSource += new GridNeedDataSourceEventHandler(grdUsers_NeedDataSource);  
            }  
        }  
 
 
        protected void btnSearch_Click(object sender, EventArgs e)  
        {  
            grdUsers.Rebind();  
        }  
 
        protected void grdUsers_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
        {  
            grdUsers.DataSource = GetUsers();  
        }  
 

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 26 Jan 2009, 07:52 AM

Hello Craig,

Unfortunately I am unable to reproduce the behavior described by you. Could you, please, supply more details about your scenario and implementation or send us (through a formal support ticket.) a small runnable solution in which this behavior can be observed.

Looking forward to your reply.

Best Regards,

Tsvetoslav
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Craig Hinkel
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or