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
0
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
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
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
Hello Srinath,
The code below demonstrates one such approach:
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
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.
You can also have a look at the following help document link.
Accessing the elements of advanced type pager
Princy.