Hi,
Can you help me to figure out how to show hide or enable disable paging on the client? I'm trying to hide or disable the paging bar at the bottom of the page when searching. I attached a image to give you an idea. When returning search results I want results without paging.
Thanks,
Ron.
Can you help me to figure out how to show hide or enable disable paging on the client? I'm trying to hide or disable the paging bar at the bottom of the page when searching. I attached a image to give you an idea. When returning search results I want results without paging.
Thanks,
Ron.
5 Answers, 1 is accepted
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Apr 2012, 01:39 PM
Hello Ron,
you can hide pagging by below code snippet.
and
you can show pagging by below code snippet.
Thanks,
Jayesh Goyani
you can hide pagging by below code snippet.
var
RadGrid1 = $find(
"<%=RadGrid1.ClientID %>"
);
$(
'.rgPager'
).attr(
"style"
,
"display: none;"
);
and
you can show pagging by below code snippet.
var
RadGrid1 = $find(
"<%=RadGrid1.ClientID %>"
);
$(
'.rgPager'
).attr(
"style"
,
"display: '';"
);
Thanks,
Jayesh Goyani
0
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 16 Apr 2012, 04:03 PM
Hello Ron,
Please add Jquery file in your project/page.
Note : you can download jquery file from below link.
http://docs.jquery.com/Downloading_jQuery
I already tested above (JS) code its working correctly on my side..
Thanks,
Jayesh Goyani
Please add Jquery file in your project/page.
<
head
runat
=
"server"
>
<
script
src
=
"Scripts/jquery-1.4.1.js"
type
=
"text/javascript"
></
script
>
............
..............
Note : you can download jquery file from below link.
http://docs.jquery.com/Downloading_jQuery
I already tested above (JS) code its working correctly on my side..
Thanks,
Jayesh Goyani
0
Ron
Top achievements
Rank 1
answered on 16 Apr 2012, 05:20 PM
Jayesh,
Once again thanks! That worked, just one problem. When clearing the search or the search criteria and returning to normal mode paging isn't quite right. I'll explain...Say you search for the word "blue" and you get your results then you want to return all results so you clear the search box and click enter. Everything returns fine but the page size is set to 50 but the grid is displaying results beyond 50. I explicitly set the grid pageSize property to 50 and it shows 50 in the pagination bar but the grid shows more. What's even more interesting is my icons in the grid stop and 50 but the results continue without the icons. I attached an image to clearify.
Thanks,
Ron.
Once again thanks! That worked, just one problem. When clearing the search or the search criteria and returning to normal mode paging isn't quite right. I'll explain...Say you search for the word "blue" and you get your results then you want to return all results so you clear the search box and click enter. Everything returns fine but the page size is set to 50 but the grid is displaying results beyond 50. I explicitly set the grid pageSize property to 50 and it shows 50 in the pagination bar but the grid shows more. What's even more interesting is my icons in the grid stop and 50 but the results continue without the icons. I attached an image to clearify.
if
(searchValue !=
""
) {
var
RadGrid1 = $find(
"<%=grdInvoices1.ClientID %>"
);
$(
'.rgPager'
).attr(
"style"
,
"display: none;"
);
}
else
{
var
RadGrid1 = $find(
"<%=grdInvoices1.ClientID %>"
);
$(
'.rgPager'
).attr(
"style"
,
"display: '';"
);
RadGrid1.MasterTableView.set_pageSize(pageSize);
}
Thanks,
Ron.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 17 Apr 2012, 07:20 AM
Hello Ron,
Please check below link.
http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-firecommand.html
and after trigger the firecommand from client side.
you can get this event on server side.
Thanks,
Jayesh Goyani
Please check below link.
http://www.telerik.com/help/aspnet-ajax/grid-gridtableview-firecommand.html
and after trigger the firecommand from client side.
you can get this event on server side.
protected
void
RadGrid1_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.CommandName == RadGrid.PageCommandName)
{
// set your page size here
}
}
Thanks,
Jayesh Goyani