or
Hello Telerik,
I have a problem when dealing with RadComboBox.
if the comboBox is disabled, and I want to select an item it doesn't work
the following not working:
ComboBoxTitle.disable();
ComboBoxTitle.findItemByValue(
"2"
).select();
if
(!ComboBoxTitle.get_enabled()) {
ComboBoxTitle.enable();
ComboBoxTitle.findItemByValue(ContactData.TitleId).select();
ComboBoxTitle.disable();
}
else
{
ComboBoxTitle.findItemByValue(ContactData.TitleId).select();
}
Hi Team
I've desing in my web application as....
<tr> <td> <asp:Panel runat="server" ID="uxJumpPanel"> <telerik:RadListView ID="feeldChoices" runat="server"> <ItemTemplate> <table cellpadding="0" cellspacing="0"> <tr> <td> <telerik:RadTextBox runat="server" Text='<%# Eval("Text") %>' onkeyup="SyncListToCheckbox(this)" ID="uxItemText" Width="260"> </telerik:RadTextBox> <telerik:RadComboBox runat="server" ID="uxSelectPage1" ></telerik:RadComboBox> </td> <td> <img id="imageAdd" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,add|' + this.id + ',' + selectedDockId); SetUnsaved();" alt="Add field choice" border="0" src="Images/Add.png" /> </td> <td> <img id="imageDelete" style="cursor: pointer" runat="server" onclick="InitiateAjaxRequest('1,3,remove|' + this.id + ',' + selectedDockId); SetUnsaved();" alt="Delete field choice" border="0" src="Images/Delete.png" /> </td> </tr> </table> </ItemTemplate> </telerik:RadListView> </asp:Panel> </td> </tr>
actually am not able to bind the data to "uxSelectPage1" radcombobox. It always shows empty.
Where am doing wrong?
<script type=
"text/javascript"
>
var
prototype = Telerik.Web.UI.RadComboBox.prototype;
var
set_text = prototype.set_text;
var
propertyChange = prototype._onInputPropertyChange;
prototype.set_text =
function
(value) {
this
._skipEvent = 0;
set_text.call(
this
, value);
};
prototype._onInputPropertyChange =
function
() {
if
(!event.propertyName)
event = event.rawEvent;
if
(event.propertyName ==
"value"
) {
this
._skipEvent++;
if
(
this
._skipEvent == 2)
return
;
propertyChange.call(
this
);
}
};
</script>
<script type=
"text/javascript"
>
var
prototype = RadComboBox.prototype;
var
set_text = prototype.SetText;
var
propertyChange = prototype.OnInputPropertyChange;
prototype.SetText =
function
(value) {
this
._skipEvent = 0;
set_text.call(
this
, value);
};
prototype.OnInputPropertyChange =
function
() {
if
(!event.propertyName)
event = event.rawEvent;
if
(event.propertyName ==
"value"
) {
this
._skipEvent++;
if
(
this
._skipEvent == 2)
return
;
propertyChange.call(
this
);
}
};
</script>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"cboState"
Width
=
"300px"
AllowCustomText
=
"false"
MarkFirstMatch
=
"true"
/>
function
OnSpliterClientLoaded(sender, args) {
SizeGridToFit()
}
function
OnSplitterClientResized(sender, Args) {
SizeGridToFit();
}
function
SizeGridToFit() {
var
tabStrip = $find(
"<%= MyTabStrip.ClientID %>"
);
switch
(tabStrip.get_selectedTab().get_value()) {
case
"Travel"
:
grid = $find(
"<%= MyUserControl1.MyGrid.ClientID %>"
);
break
;
case
"Other"
:
grid = $find(
"<%= MyUserControl2.MyGrid.ClientID %>"
);
break
;
}
if
(grid) {
var
mpPane = $find(
"<%= MultiPagePane1.ClientId %>"
)
grid.get_element().style.height = mpPane.get_height() - 12 +
'px'
;
var
ieVersion = getInternetExplorerVersion()
if
(ieVersion >= 0 && ieVersion < 8.0) {
//necessary to get horizontal scrollbars to work in IE 7.
grid.get_element().style.width = mpPane.get_width() - 12 +
'px'
;
}
grid.repaint();
}
}
function
getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
var
rv = -1;
// Return value assumes failure.
if
(navigator.appName ==
'Microsoft Internet Explorer'
) {
var
ua = navigator.userAgent;
var
re =
new
RegExp(
"MSIE ([0-9]{1,}[\.0-9]{0,})"
);
if
(re.exec(ua) !=
null
)
rv = parseFloat(RegExp.$1);
}
return
rv;
}