9 Answers, 1 is accepted
0

Jayesh Goyani
Top achievements
Rank 2
answered on 08 Apr 2012, 06:39 PM
0

Covertix
Top achievements
Rank 1
answered on 09 Apr 2012, 09:07 AM
Thanks for your reply, but it is not what I've meant.
I know how to use scrolling.
I want to determine if the vertical scroll is shown or not.
If there are 2 items, then the scroll won't be shown (their height is less than the scroll height),
but if there are 30 items, for example, than the scroll will be shown.
Is there a way to calculate, or to get property that says if the scroll is shown or not?
I know how to use scrolling.
I want to determine if the vertical scroll is shown or not.
If there are 2 items, then the scroll won't be shown (their height is less than the scroll height),
but if there are 30 items, for example, than the scroll will be shown.
Is there a way to calculate, or to get property that says if the scroll is shown or not?
0
Hello Tzach,
Tsvetina
the Telerik team
You can use client script to check the height of the scrollable are in RadGrid and if it exceeds the height that you have set, then a scroll bar is visible.
1) If you do not use static headers, check if gridInstance.get_element().clientHeight is more than the Height that you have specified for RadGrid.
2) If you use static headers, check if gridInstance.GridDataDiv.clientHeight is more than the ScrollHeight that you have specified for RadGrid.
I hope this helps.
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Covertix
Top achievements
Rank 1
answered on 18 Apr 2012, 10:44 AM
Hi Tsvetina,
Thank you for your replay.
How can I know in client side that the page size was changed?
I can't find any client event for this operation.
Thanks!
Thank you for your replay.
How can I know in client side that the page size was changed?
I can't find any client event for this operation.
Thanks!
0
Hi Tzach,
The client-side OnCommand event will fire when the page size is changed:
OnCommand
Greetings,
Tsvetina
the Telerik team
The client-side OnCommand event will fire when the page size is changed:
OnCommand
Greetings,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Covertix
Top achievements
Rank 1
answered on 22 Apr 2012, 03:04 PM
Hi Tsvetina,
I tried , but the event doesn't fire when PAGE SIZE is changed. (it is fired when changing page..).
Do you know another event that can help me?
Thank you very much..
I tried , but the event doesn't fire when PAGE SIZE is changed. (it is fired when changing page..).
Do you know another event that can help me?
Thank you very much..
0
Hello Tzach,
You can also try attaching the OnClientSelectedIndexChanged event of the pagesize combo:
javascript:
I hope this helps.
All the best,
Tsvetina
the Telerik team
You can also try attaching the OnClientSelectedIndexChanged event of the pagesize combo:
protected
void
RadGrid1_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridPagerItem)
{
RadComboBox comboPageSize = (RadComboBox )e.Item.FindControl(
"PageSizeComboBox"
);
comboPageSize.OnClientSelectedIndexChanged=
"pageSizeChanged"
;
}
}
javascript:
function
pageSizeChanged(sender, args)
{
//sender is the combo box
}
I hope this helps.
All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Covertix
Top achievements
Rank 1
answered on 29 Apr 2012, 08:49 AM
Hi Tsvetina,
I cannot find the control with the name you gave me (PageSizeComboBox).
The line:
always returns null object.
Thanks.
I cannot find the control with the name you gave me (PageSizeComboBox).
The line:
RadComboBox comboPageSize = (RadComboBox )e.Item.FindControl(
"PageSizeComboBox"
);
always returns null object.
Thanks.
0

Covertix
Top achievements
Rank 1
answered on 30 Apr 2012, 10:26 AM
Hi Tsvetina and thanks for your help.
I solved the problem.
What I did, is to check when GridCreated event is called, if the data height is greater than the scroll height.
I solved the problem.
What I did, is to check when GridCreated event is called, if the data height is greater than the scroll height.
function GridCreated (sender, args)
{
var dataHeight = sender.get_masterTableView().get_element().clientHeight;
if (dataHeight > scrollHeight)
{
//There is a vertical scroll
}
}