function GetCheckedItemCountbtnClick() {
var checkedcount = 0;
var grid = $find("<%=gvSummary.ClientID %>");
for (var i = 0; i <
grid.get_masterTableView
().get_dataItems().length; i++) {
var
objchkbox
=
grid
.get_masterTableView().get_dataItems()[i].findElement("CheckBoxStatus");
if (objchkbox.checked) {
checkedcount++;
}
//}
if (checkedcount > 8) {
objchkbox.checked = false;
alert("Please select only 8 item");
return false;
}
}
if (checkedcount == 0) {
alert("Please Check at least one CheckBox");
return false;
}
}
I have a Button I want to disable when the 'checkedcount ==0' unless an item is checked
<
asp:Button
ID
=
"btnPrint"
runat
=
"server"
Font-Size
=
"X-Small"
OnClick
=
"btnPrint_Click"
Text
=
"Print"
ToolTip
=
"Create a report..."
/>
Nothing seems to work for me. Any idea will be appreciated.
hi support,
I'm using RadSplitter and RadPane to build my page (see page markup as below). The page has min-height and min-width setup in order to show scrollbar(s) whenever the size of browser window hits the minimum height/width. The problem i have is an extra space appears at the bottom of page (under the most outer RadSplitter) after resizing the browser window to the min-height and this ONLY happens in IE8 and Safari 5.0 + (images attached), the page itself is quite simple and i don't know it's because i'm doing something wrong or related to telerik control. Please help and very appreciated!
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
></
title
>
<
style
type
=
"text/css"
>
html, body, form
{
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
form.main
{
overflow: auto;
}
.MainDiv
{
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
min-height:500px;
min-width:1000px;
}
.LeftColumn, .RightColumn
{
background: #eee;
}
.CenterColumn
{
background: #fff;
border: 1px solid #777;
}
.Footer
{
background: #eee;
text-align: center;
}
.Header
{
text-align: center;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
class
=
"main"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"MasterRadScriptManager"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
div
id
=
"mainDiv"
class
=
"MainDiv"
>
<
telerik:RadSplitter
runat
=
"server"
ID
=
"PageSplitter"
Orientation
=
"Horizontal"
BorderSize
=
"1"
VisibleDuringInit
=
"false"
Width
=
"100%"
Height
=
"100%"
>
<
telerik:RadPane
runat
=
"server"
ID
=
"TopHeaderPane"
Height
=
"50px"
Locked
=
"true"
Scrolling
=
"None"
>
<
div
class
=
"Header"
>Top Header</
div
>
</
telerik:RadPane
>
<
telerik:RadPane
runat
=
"server"
ID
=
"MainPane"
Scrolling
=
"None"
>
<
telerik:RadSplitter
runat
=
"server"
ID
=
"MainSplitter"
BorderSize
=
"0"
Orientation
=
"Vertical"
VisibleDuringInit
=
"false"
Width
=
"100%"
Height
=
"100%"
>
<
telerik:RadPane
runat
=
"server"
ID
=
"LeftColumnPane"
Scrolling
=
"None"
CssClass
=
"LeftColumn"
Width
=
"220px"
>
<
div
id
=
"LeftSideColumn"
>Left side menu contents</
div
>
</
telerik:RadPane
>
<
telerik:RadPane
runat
=
"server"
ID
=
"MainContentPane"
Scrolling
=
"None"
CssClass
=
"CenterColumn"
>
<
telerik:RadSplitter
runat
=
"server"
ID
=
"MainContentSplitter"
Orientation
=
"Horizontal"
BorderSize
=
"1"
VisibleDuringInit
=
"false"
Width
=
"100%"
Height
=
"100%"
>
<
telerik:RadPane
runat
=
"server"
ID
=
"MainContentScreenContentPane"
Scrolling
=
"Both"
>
<
asp:TextBox
ID
=
"textBox01"
runat
=
"server"
>Input textbox</
asp:TextBox
>
</
telerik:RadPane
>
<
telerik:RadPane
runat
=
"server"
ID
=
"MainContentButtonBarPane"
Scrolling
=
"None"
Height
=
"40px"
Locked
=
"true"
>
<
asp:Button
ID
=
"SubmitButton"
runat
=
"server"
Text
=
"Submit"
/>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
</
telerik:RadPane
>
<
telerik:RadPane
runat
=
"server"
ID
=
"RightColumnPane"
CssClass
=
"RightColumn"
Width
=
"220px"
Scrolling
=
"None"
>
<
div
id
=
"RightSideColumn"
>Right side menu contents</
div
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
</
telerik:RadPane
>
<
telerik:RadPane
runat
=
"server"
ID
=
"MasterFooterPane"
Height
=
"25px"
CssClass
=
"Footer"
Scrolling
=
"None"
>
<
div
class
=
"Footer"
>Footer Bar</
div
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
</
div
>
</
form
>
</
body
>
</
html
>
<script language="javascript" type="text/javascript"> |
var datePickerAttributionSetter; |
function InitializedAttributionDateSetter(sender, args) |
{ |
var datePickerAttribution = $find("<%= RadDatePickerAttribution.ClientID %>"); |
var datePickerTheoricalExam = $find("<%= RadDatePickerTheroicExam.ClientID %>"); |
var datePickerPracticalExam = $find("<%= RadDatePickerPracticalExam.ClientID %>"); |
datePickerAttributionSetter = |
new QualificationAttribution.QualificationAttributionDateSetter(datePickerAttribution, |
datePickerTheoricalExam, datePickerPracticalExam); |
} |
Sys.Application.add_load(InitializedAttributionDateSetter); |
</script> |
QualificationAttribution.QualificationAttributionDateSetter = function(datePickerAttribution, datePickerTheoricalExam, datePickerPracticalExam) |
{ |
this._datePickerAttribution = datePickerAttribution; |
this._datePickerTheoricalExam = datePickerTheoricalExam; |
this._datePickerPracticalExam = datePickerPracticalExam; |
if ((this._datePickerTheoricalExam != null) && (this._datePickerPracticalExam != null)) |
{ |
var theoricalSelectedDateHandler = FixHandler(this.OnSelectedDate, this); |
datePickerTheoricalExam.add_dateSelected(theoricalSelectedDateHandler); |
datePickerTheoricalExam.add_disposing(function() |
{ |
datePickerTheoricalExam.remove_dateSelected(theoricalSelectedDateHandler); |
}); |
var practicalSelectedDateHandler = FixHandler(this.OnSelectedDate, this); |
datePickerPracticalExam.add_dateSelected(practicalSelectedDateHandler); |
datePickerPracticalExam.add_disposing(function() |
{ |
datePickerPracticalExam.remove_dateSelected(practicalSelectedDateHandler); |
}); |
} |
} |
QualificationAttribution.QualificationAttributionDateSetter.prototype.OnSelectedDate = function() |
{ |
var theoricalExamDate = this.GetDate(this._datePickerTheoricalExam); |
var practicalExamDate = this.GetDate(this._datePickerPracticalExam); |
if ((theoricalExamDate != null) && (practicalExamDate != null)) |
{ |
var highestDate = this.GetHighestDate(theoricalExamDate, practicalExamDate); |
this._datePickerAttribution.set_selectedDate(new Date(highestDate)); |
} |
else |
{ |
this._datePickerAttribution.set_selectedDate(); |
} |
} |
QualificationAttribution.QualificationAttributionDateSetter.prototype.GetDate = function(radDatePicker) |
{ |
return radDatePicker.get_selectedDate(); |
} |
QualificationAttributionDateSetter.prototype.GetHighestDate = function(theoricalExamDate, practicalExamDate) |
{ |
if ((theoricalExamDate == null) || (practicalExamDate == null)) |
{ |
return null; |
} |
if (theoricalExamDate > practicalExamDate) |
{ |
return theoricalExamDate; |
} |
return practicalExamDate; |
} |
Please see below code. We have panel in <AdvancedInsertTemplate>and <AdvancedEditTemplate> block for description label and textbox. When select a room 201(please see attached screen), need to hide that description panel. Please help for how I can find that panel ID in "roomResource_SelectedIndexChanged", then make that panel visible is false or you have good solution for hide that panel? Thanks.
<AdvancedInsertTemplate>
<
telerik:RadListBox
ID
=
"rlbManaged"
EmptyMessage
=
"No objects added"
Width
=
"100%"
AllowDelete
=
"true"
Height
=
"120px"
CheckBoxes
=
"true"
runat
=
"server"
SelectionMode
=
"Multiple"
>
<
items
>
<
telerik:RadListBoxItem
Text
=
"item1"
/>
<
telerik:RadListBoxItem
Text
=
"item2"
/>
<
telerik:RadListBoxItem
Text
=
"item3"
/>
</
items
>
</
telerik:RadListBox
>