or
Hi,
I've built a grid which uses Virtual Scrolling and has been set up with a page size of 8. I've noticed that intermittently that the vertical scrollbar was not appearing. During my investigation I discovered that if the VirtualItemCount is 32, the Scrollbar disappears and if I increase the VirtualItemCount to 33, the vertical scrollbar will happily appear.
Can you please provide a solution to this issue?
Thanks,
Aash.
I use OnClientClick="showNotification();" on a asp:button with this java script. I try to use on same page validate a control with a telerik:RadButton and OnClientClicked, but dont have it to work. Only works with asp:button.
How to get showNotification work with telerik:RadButton?
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function showNotification() {
var notification = $find("<%= RadNotification1.ClientID %>");
setTimeout(function () {
notification.show();
}, 0);
}
function CheckIfShow(sender, args) {
var summaryElem = document.getElementById("<%= ValidationSummary1.ClientID %>");
var noErrors = summaryElem.style.display == "none";
args.set_cancel(noErrors);
}
</
script
>
</
telerik:RadScriptBlock
>
<
telerik:GridTemplateColumn
UniqueName
=
"Dossier"
SortExpression
=
"Identification"
HeaderText="<%$Resources:ESTV.A3, LabelDossier%>" DataField="Identification"
CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" ShowFilterIcon="false"
ShowSortIcon="True">
<
ItemTemplate
>
<
a
href
=
"<%# Eval("
Case.Url") %>">
<%# Eval("Case.Identification") %></
a
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"comboBoxDossier"
AllowCustomText
=
"True"
EnableLoadOnDemand
=
"True"
EnableVirtualScrolling
=
"False"
AutoPostBack
=
"True"
ShowMoreResultsBox
=
"True"
CausesValidation
=
"False"
EmptyMessage="<%$Resources:ESTV.A3, MessageSearchForDossierEmpty%>" Skin="Office2010Blue"
Width="200px" MaxHeight="100px" ItemsPerRequest="50" OnItemsRequested="ComboBoxDossierItemsRequested"
OnSelectedIndexChanged="ComboBoxDossierOnSelectedIndexChanged">
</
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidatorDossier"
runat
=
"server"
ControlToValidate
=
"comboBoxDossier"
ErrorMessage="<%$Resources:ESTV.A3, MessageMandatoryField%>"></
asp:RequiredFieldValidator
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"Address"
SortExpression
=
"FullName"
HeaderText
=
"Adressen"
DataField
=
"FullName"
CurrentFilterFunction
=
"Contains"
AutoPostBackOnFilter
=
"true"
ShowFilterIcon
=
"false"
ShowSortIcon
=
"True"
>
<
ItemTemplate
>
<
a
href
=
"ViewAddress.aspx?id=<%#Eval("
Address.Id") %>">
<%# Eval("Address.FullName") %>
</
a
>
</
ItemTemplate
>
<
EditItemTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"comboBoxAddress"
AllowCustomText
=
"True"
EnableLoadOnDemand
=
"True"
EnableVirtualScrolling
=
"False"
AutoPostBack
=
"True"
ShowMoreResultsBox
=
"True"
CausesValidation
=
"False"
EmptyMessage="<%$Resources:ESTV.A3, MessageSearchForAddressEmpty%>" Skin="Office2010Blue"
Width="200px" MaxHeight="100px" ItemsPerRequest="50" OnItemsRequested="ComboBoxAddressItemsRequested"
OnSelectedIndexChanged="ComboBoxAddressOnSelectedIndexChanged">
</
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidatorAddress"
runat
=
"server"
ControlToValidate
=
"comboBoxAddress"
ErrorMessage="<%$Resources:ESTV.A3, MessageMandatoryField%>"></
asp:RequiredFieldValidator
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
AddressCaseRelationBll addressCaseRelationBll =
new
AddressCaseRelationBll();
AddressBll addressBll =
new
AddressBll();
RadComboBox comboBoxDossiers = o
as
RadComboBox;
if
(comboBoxDossiers ==
null
)
{
return
;
}
try
{
if
(
string
.IsNullOrEmpty(comboBoxDossiers.SelectedValue))
{
List<Address> addresses = addressBll.Select();
RadComboBox comboBoxAddress = (RadComboBox)
this
.radGridAddressCaseRelation.MasterTableView.GetInsertItem().FindControl(ControlAddress);
comboBoxAddress.Items.Clear();
foreach
(Address address
in
addresses)
{
comboBoxAddress.Items.Add(
new
RadComboBoxItem(
address.FullName, address.Id.ToString()));
}
}
else
{
List<AddressCaseRelation> addressCaseRelations = addressCaseRelationBll.SelectByCase(
new
Guid(comboBoxDossiers.SelectedValue));
RadComboBox comboBoxAddress = (RadComboBox)
this
.radGridAddressCaseRelation.MasterTableView.GetInsertItem().FindControl(ControlAddress);
comboBoxAddress.Items.Clear();
if
(
string
.IsNullOrEmpty(comboBoxAddress.SelectedValue))
{
foreach
(AddressCaseRelation addressCaseRelation
in
addressCaseRelations)
{
comboBoxAddress.Items.Add(
new
RadComboBoxItem(
addressCaseRelation.Address.FullName, addressCaseRelation.Address.Id.ToString()));
}
}
}
}
<
telerik:RadListView
ID
=
"lvPostings"
runat
=
"server"
AllowPaging
=
"true"
PageSize
=
"9"
>
<
LayoutTemplate
>
<
div
id
=
"listView"
>
<
a
class
=
"pagePrev"
href
=
"javascript:void(0);"
title
=
"Go to previous page"
></
a
>
<
a
class
=
"pageNext"
href
=
"javascript:void(0);"
title
=
"Go to next page"
></
a
>
<
div
id
=
"items"
>
</
div
>
</
div
>
</
LayoutTemplate
>
<
ClientSettings
>
<
DataBinding
ItemPlaceHolderID
=
"items"
>
<
ItemTemplate
>
<
div
class
=
"item"
>
<
span
class
=
"name"
>#= UContactName #</
span
>
<
span
class
=
"company"
>#= Division #</
span
>
<
span
class
=
"title"
>#= PositionTitle #</
span
>
<
br
/>
</
div
>
</
ItemTemplate
>
<
EmptyDataTemplate
>
<
div
class
=
"empty"
>
No Matching Data
</
div
>
</
EmptyDataTemplate
>
<
DataService
Location
=
"http://linkapi/SLogic/Postings/?format=json"
HttpMethod
=
"Get"
ResponseType
=
"JSONP"
DataPropertyName
=
"Result.Data_Items"
CountPropertyName
=
"Result.Item_Count"
/>
</
DataBinding
>
<
ClientEvents
OnDataBound
=
"onListViewDataBound"
/>
</
ClientSettings
>
</
telerik:RadListView
>
<script type=
"text/javascript"
>
var
listView;
function
pageLoad()
{
listView = $find(
"lvPostings"
);
}
(
function
($)
{
$(
function
()
{
$(
".pagePrev"
).click(
function
(e)
{
listView.page(listView.get_currentPageIndex() - 1);
});
$(
".pageNext"
).click(
function
(e)
{
listView.page(listView.get_currentPageIndex() + 1);
});
});
})($telerik.$);
function
onListViewDataBound(sender, args)
{
$telerik.$(
".pagePrev"
).css(
"display"
, sender.get_currentPageIndex() === 0 ?
"none"
:
""
);
$telerik.$(
".pageNext"
).css(
"display"
, sender.get_currentPageIndex() === sender.get_pageCount() - 1 ?
"none"
:
""
);
}
</script>
#listView
{
width
:
780px
;
height
:
270px
;
margin
:
20px
auto
;
position
:
relative
;
}
.pagePrev, .pageNext
{
width
:
22px
;
height
:
22px
;
position
:
absolute
;
top
:
132px
;
background
:
transparent
url
(
'Common/sprite.gif'
)
no-repeat
scroll
0
0
;
}
.pagePrev
{
left
:
-40px
;
}
.pagePrev
{
background-position
:
0
-700px
;
}
.pagePrev:hover
{
background-position
:
0
-750px
;
}
.pageNext
{
right
:
-15px
;
}
.pageNext
{
background-position
:
0
-850px
;
}
.pageNext:hover
{
background-position
:
0
-900px
;
}
.item
{
float
:
left
;
background-color
:
#333333
;
color
:
#ffffff
;
cursor
:
pointer
;
font-size
:
12px
;
height
:
76px
;
padding-top
:
10px
;
width
:
240px
;
margin
:
5px
;
-moz-border-radius:
5px
;
-webkit-border-radius:
5px
;
border-radius:
5px
;
-moz-box-shadow:
1px
1px
3px
#212121
;
-webkit-box-shadow:
1px
1px
3px
#212121
;
box-shadow:
1px
1px
3px
#212121
;
position
:
relative
;
}
.item:hover
{
color
:
black
;
background-color
:
#9EC101
;
background-image
: -moz-linear-gradient(
#577D00
,
#89AC05
);
background-image
: -webkit-linear-gradient(
#577D00
,
#89AC05
);
background-image
: -o-linear-gradient(
#577D00
,
#89AC05
);
background-image
: linear-gradient(
#577D00
,
#89AC05
);
}
.item img, .item .photo
{
width
:
57px
;
height
:
70px
;
float
:
left
;
border
:
1px
solid
#0E0E0E
;
margin
:
-3px
10px
0
7px
;
background-color
:
#111111
;
}
.item .name, .item .company
{
display
:
block
;
margin-bottom
:
4px
;
line-height
:
14px
;
}
.item .company
{
line-height
:
12px
;
text-transform
:
uppercase
;
}
.item .title
{
position
:
absolute
;
right
:
10px
;
bottom
:
5px
;
font-size
:
12px
;
}
.empty
{
padding
:
10px
;
text-align
:
center
;
color
: White;
background-color
:
#333333
;
-moz-border-radius:
5px
;
-webkit-border-radius:
5px
;
border-radius:
5px
;
-moz-box-shadow:
1px
1px
3px
#212121
;
-webkit-box-shadow:
1px
1px
3px
#212121
;
box-shadow:
1px
1px
3px
#212121
;
}