Abhijit Shetty
Top achievements
Rank 2
Abhijit Shetty
asked on 10 Oct 2012, 03:42 AM
Hi,
How to set default PageIndex of RadGrid from markup and not in code-behind.
Thanks in advance...
How to set default PageIndex of RadGrid from markup and not in code-behind.
Thanks in advance...
4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 10 Oct 2012, 04:06 AM
Hi,
One suggestion is that you can set the page index using the following javascript.
JS:
Thanks,
Shinu.
One suggestion is that you can set the page index using the following javascript.
JS:
function
pageLoad()
{
var
masterTable = $find(
"<%= RadGrid2.ClientID %>"
).get_masterTableView();
masterTable.set_currentPageIndex(2);
}
Thanks,
Shinu.
0
Abhijit Shetty
Top achievements
Rank 2
answered on 10 Oct 2012, 04:13 AM
Thanks Shinu.
Actually i need to set it on markup so that i can fetch its values on Page_Load and bind data on RadGrid.
I found how to set default sortExpression and filterExpression but no luck with setting PageIndex.
Do radgrid have such option?
Actually i need to set it on markup so that i can fetch its values on Page_Load and bind data on RadGrid.
I found how to set default sortExpression and filterExpression but no luck with setting PageIndex.
Do radgrid have such option?
0
Accepted
Shinu
Top achievements
Rank 2
answered on 11 Oct 2012, 04:14 AM
Hi,
As far as I know, we cannot set the page index from mark up. Either you can use the client side approach given above or in code behind as RadGrid1.CurrentPageIndex = 2. Hope this helps.
Thanks,
Shinu.
As far as I know, we cannot set the page index from mark up. Either you can use the client side approach given above or in code behind as RadGrid1.CurrentPageIndex = 2. Hope this helps.
Thanks,
Shinu.
0
Abhijit Shetty
Top achievements
Rank 2
answered on 11 Oct 2012, 04:17 AM
Thanks.
That is what i wanted to know...
That is what i wanted to know...