4 Answers, 1 is accepted
0
Brad
Top achievements
Rank 1
answered on 02 Dec 2010, 09:39 PM
Is everyone on vacation?
0
Hi Brad,
The forums are a community resort and we monitor them closely, but we cannot guarantee a timely reply here. If you need a quick reply, I strongly recommend to use the support ticketing system where every ticket has guaranteed reply time corresponding to the license that you have.
As for the problem itself, could you please provide more details:
Best wishes,
Georgi Tunev
the Telerik team
The forums are a community resort and we monitor them closely, but we cannot guarantee a timely reply here. If you need a quick reply, I strongly recommend to use the support ticketing system where every ticket has guaranteed reply time corresponding to the license that you have.
As for the problem itself, could you please provide more details:
- The exact version of the controls that you are using
- What is your code for handling the click event
- Does the problem occur in all browsers or in a specific one.
Best wishes,
Georgi Tunev
the Telerik team
Explore the entire set of ASP.NET AJAX controls we offer here and browse the myriad online demos to learn more about the components and the features they incorporate.
0
Brad
Top achievements
Rank 1
answered on 03 Dec 2010, 03:31 PM
UPDATE: I have determined that the markup below has nothing to do with RadFormDecorator: I have commented out all references to them (which is observable) and the control still renders as below.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Telerik UI dll: 2010_3_1109
I have this problem in FF 3.6.12 and IE 8
My control (in a template column in a RadGrid):
the JavaScript:
how the control renders:
Notice that there are no client events. The onclick and onblur have disappeared. Also notice, as I just did, that the <input> tag is not closed.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Telerik UI dll: 2010_3_1109
I have this problem in FF 3.6.12 and IE 8
My control (in a template column in a RadGrid):
<
asp:CheckBox
ID
=
"uxIsBillableCheckBox"
runat
=
"server"
TextAlign
=
"Left"
Checked='<%# DataBinder.Eval(Container.DataItem, "IsBillable") %>' Enabled='<%# !(bool)DataBinder.Eval(Container.DataItem, "IsClosed") %>' ToolTip="is the item billable?" onblur="isBillableBlur" onclick="isBillableClick" />
the JavaScript:
function isBillableClick(sender) {
console.log(' *** isBillableClick');
}
function isBillableBlur(sender) {
console.log(' *** isBillableBlur');
}
how the control renders:
<
span
onblur
=
"isBillableBlur"
title
=
"is the item billable?"
><
input
type
=
"checkbox"
onclick
=
"isBillableClick;"
name
=
"ctl00$bodyContentPlaceHolder$uxContainer$uxGrid$ctl00$ctl04$uxIsBillableCheckBox"
id
=
"ctl00_bodyContentPlaceHolder_uxContainer_uxGrid_ctl00_ctl04_uxIsBillableCheckBox"
_rfddecoratedid
=
"_rfdSkinnedctl00_bodyContentPlaceHolder_uxContainer_uxGrid_ctl00_ctl04_uxIsBillableCheckBox"
class
=
"rfdRealInput"
><
label
for
=
"ctl00_bodyContentPlaceHolder_uxContainer_uxGrid_ctl00_ctl04_uxIsBillableCheckBox"
unselectable
=
"on"
id
=
"_rfdSkinnedctl00_bodyContentPlaceHolder_uxContainer_uxGrid_ctl00_ctl04_uxIsBillableCheckBox"
class
=
" rfdCheckboxUnchecked"
> </
label
></
span
>
Notice that there are no client events. The onclick and onblur have disappeared. Also notice, as I just did, that the <input> tag is not closed.
0
Accepted
Brad
Top achievements
Rank 1
answered on 03 Dec 2010, 05:24 PM
I have determined that it is not possible to define events on CheckBoxes in template columns in RadGrids (since there is custom rendering happening).
The solution is something like follows:
PLEASE MARK THIS AS THE ANSWER
The solution is something like follows:
protected void uxGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
Control ctrl;
if (e.Item.ItemType == GridItemType.Item ||
e.Item.ItemType == GridItemType.AlternatingItem)
{
// wire-up client event to myCheckbox checkbox (not possible from apsx)
ctrl = e.Item.FindControl("myCheckbox");
if (ctrl != null)
{
((WebControl)ctrl).Attributes["onclick"] = "myCheckboxClickMethod";
}
}
PLEASE MARK THIS AS THE ANSWER