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

How to persist focus on pager index while dataediting in grid

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 01 Aug 2011, 02:17 PM
we update the data on the client and then process all changes on the server with a Grid /Client  Edit with single batch update .   
we are using this link  http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx
we have one problem,how to persist focus on grid pager when we update record on  one page ie pager index 1 and move to second page ie pager index  2,when we again go back to previous record ie on page 1 in grid it will go to page 1 but pager index is not updated it still focus on pager index 2. How to persist focus to pager index to previous page .



1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 01 Aug 2011, 07:31 PM
hi,
protected void btnBatchUpadate_Click(object sender, EventArgs e)
        {
            int index = RadGrid1.CurrentPageIndex;
 
            //your code for update dataBase
            
            RadGrid1.CurrentPageIndex = index;
 
            // method 1
            RadGrid1.DataSource = "";
            RadGrid1.DataBind();
 
            //method 2 .. if you used advance data binding
           //RadGrid1.Rebind();
 
        }

let me know if any concern.


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Rahul
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or