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

[Solved] RadGrid Paging

4 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Srinath
Top achievements
Rank 1
Srinath asked on 01 May 2008, 01:00 PM

Hi All,

Ques: 1
 I have a RadGird on my page with paging enabled. I f click on the  "page 2"  I am able to access the " page 1" grid rows with  "radGrid1.Items". But How can I access "Page 2" RadGrid rows.

Ques: 2
Can raise JavaScript function on Page number click, with out posting back the page.

Pls reply back soon its urgent !! :(

Thanks,

--Srinath

4 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 01 May 2008, 01:36 PM
Hi Srinath,

It depends on which event you are accessing the items. If you are accessing them in the PreRender handler, after a page operation, only the items on the current page will be available.
Further , at present, no client side habdlers are associated with a page operation. You can assign onclick handlers dynamically, from the code-behind - either to the whole item (GridPagerItem), or any controls nested in it. You can also use a pager template, to locate the items in the pager more easily.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Srinath
Top achievements
Rank 1
answered on 01 May 2008, 01:44 PM
Ans: 2 is clear.

Ans: 1 is not clear.

Could you pls gimme an eg: with the same terminology [page 2: New page , page 1: current page].


--Srinath
0
Yavor
Telerik team
answered on 08 May 2008, 06:33 AM
Hello Srinath,

The code below demonstrates one such approach:

 protected void RadGrid1_PreRender(object sender, EventArgs e)  
    {  
        GridPagerItem pagerItem = (GridPagerItem)RadGrid1.MasterTableView.GetItems(GridItemType.Pager)[0];  
        pagerItem.Attributes.Add("onclick", "functionToHandleClick();");  
    } 

You can also use the .Controls collection to access any item in the pager, and assign a similar onclick handler.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Princy
Top achievements
Rank 2
answered on 08 May 2008, 08:59 AM
Hi Srinath,

You can also have a look at the following help document link.
Accessing the elements of advanced type pager

Princy.
Tags
Grid
Asked by
Srinath
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Srinath
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or