| <rada:radajaxmanager id="RadAjaxManager1" runat="server" DESIGNTIMEDRAGDROP="278"> |
| <AjaxSettings> |
| <rada:AjaxSetting AjaxControlID="lbtRefresh"> |
| <UpdatedControls> |
| <rada:AjaxUpdatedControl ControlID="CallbackPanel1"></rada:AjaxUpdatedControl> |
| </UpdatedControls> |
| </rada:AjaxSetting> |
| <rada:AjaxSetting AjaxControlID="lbPullCredit"> |
| <UpdatedControls> |
| <rada:AjaxUpdatedControl ControlID="CallbackPanel1"></rada:AjaxUpdatedControl> |
| </UpdatedControls> |
| </rada:AjaxSetting> |
| <rada:AjaxSetting AjaxControlID="cxShowAllSubmissions"> |
| <UpdatedControls> |
| <rada:AjaxUpdatedControl ControlID="CallbackPanel1"></rada:AjaxUpdatedControl> |
| </UpdatedControls> |
| </rada:AjaxSetting> |
| <rada:AjaxSetting AjaxControlID="DataGrid1"> |
| <UpdatedControls> |
| <rada:AjaxUpdatedControl ControlID="CallbackPanel1"></rada:AjaxUpdatedControl> |
| </UpdatedControls> |
| </rada:AjaxSetting> |
| <rada:AjaxSetting AjaxControlID="btClose"> |
| <UpdatedControls> |
| <rada:AjaxUpdatedControl ControlID="CallbackPanel1"></rada:AjaxUpdatedControl> |
| </UpdatedControls> |
| </rada:AjaxSetting> |
| </AjaxSettings> |
| <ClientEvents OnResponseEnd="OnResponseEnd" OnRequestStart="OnRequestStart"></ClientEvents> |
| </rada:radajaxmanager> |
| <TR> |
| <TD style="HEIGHT: 20px" vAlign="top"> |
| <asp:CheckBox id="cxShowAllSubmissions" runat="server" Text="Show All Submissions" AutoPostBack="True"></asp:CheckBox></TD> |
| </TR> |
private
void cxShowAllSubmissions_CheckedChanged(object sender, System.EventArgs e)
{
BindSubmissions(
false);
}
in code behind.
so the problem is that the event does not fire when Manager has code above, but if remove then it fires. The problem is that i need that control ajaxafied. I am new to Telerik and am sure im just misusing somehow.
Any Suggestions would be great.
BTW this is a .Net 1.1 app
| <telerik:GridBoundColumn DataField="Data1" HeaderText="Data 1" |
| UniqueName="Data1" |
| DataFormatString="{0:dd/MM/yyyy}" |
| DataType="System.DateTime" |
| ItemStyle-Width="140px" HeaderStyle-Width="140px"> |
| </telerik:GridBoundColumn> |
| <sharepoint:SPDataSource DataSourceMode="List" |
| Scope="Default" UseInternalName="true" |
| IncludeHidden="true" |
| ID="spdsCalendar" runat="server"> |
| <SelectParameters> |
| <asp:Parameter Name="ListName" DefaultValue="TravelCalendarList" /> |
| </SelectParameters> |
| <InsertParameters> |
| <asp:Parameter Name="ListName" DefaultValue="TravelCalendarList" /> |
| </InsertParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="ListName" DefaultValue="TravelCalendarList" /> |
| </UpdateParameters> |
| <DeleteParameters> |
| <asp:Parameter Name="ListName" DefaultValue="TravelCalendarList" /> |
| </DeleteParameters> |
| </sharepoint:SPDataSource> |
| protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e) |
| { |
| try |
| { |
| if ((e.ModifiedAppointment.Subject == String.Empty) | (e.ModifiedAppointment.Start > e.ModifiedAppointment.End)) |
| { |
| e.Cancel = true; |
| } |
| else |
| { |
| e.Appointment.Subject = e.ModifiedAppointment.Subject; |
| e.Appointment.Start = e.ModifiedAppointment.Start; |
| e.Appointment.End = e.ModifiedAppointment.End; |
| } |
| } |
| catch (Exception ex) |
| { |
| lblError.Text = ex.Message.ToString(); |
| } |
| } |
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
|
Stack Trace:
|
<
telerik:RadNumericTextBox ID="txtThreshold" runat="server" Width="104px" Value='<%# DataBinder.Eval(Container,"DataItem.threshold") %>'></telerik:RadNumericTextBox>
This works fine for editing, but when I try to use it for inserting I always get an InvalidCastException: "The specified cast is invalid" with the folowing stack trace:
at ASP.configuration_alerts_aspx.__DataBinding__control24(Object sender, EventArgs e) in d:\Projects\WebMonitor\Web\Configuration\Alerts.aspx:line 77
at System.Web.UI.Control.OnDataBinding(EventArgs e)
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
Replacing the NumericTextBox with a standard TextBox works fine. I have also tried setting a custom value in the ItemCommand event, to really make sure there is a value being passed to the control:
protected
void gridAlertTypes_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
e.Canceled = true;
System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();newValues["description"] = "New description";
newValues["threshold"] = 55;
e.Item.OwnerTableView.InsertItem(newValues);
}
}
But I still get the same error. I have also tried to declare the control so that the DataBinding only happens when in edit mode, and for insert I declare a hard-coded value of 0:
<telerik:RadNumericTextBox ID="txtThreshold" runat="server" Width="104px" Value='<%# (Container is GridEditFormInsertItem) ? 0 : DataBinder.Eval(Container,"DataItem.threshold") %>'></telerik:RadNumericTextBox>
But still no luck! I tried putting double quotes around the 0 as well. Which is strange, because if I use Value='0' that works fine, effectivly thats what the above statement should do when in insert mode. Any help would be appreciated!
Thanks
Michael
| enable | no param | no param | Enables the date input control. |
| disable | no param | no param | Disables the date input control. |
<
script type="text/javascript" language=javascript>
function toggle_RadNumericTextBox(obj) {
if (obj.checked) {
//document.getElementById('<%=RadNumericTextBox1.ClientID%>').enable();//document.getElementById('<%=TextBox1.ClientID%>').disabled = true; this won't work becaust the input is hidden
$find("<%= RadNumericTextBox1.ClientID %>").enable();
}
else
$find(
"<%= RadNumericTextBox1.ClientID %>").disabled();
//document.getElementById('<%=RadNumericTextBox1.ClientID%>').disabled = true;
//document.getElementById('<%=TextBox1.ClientID%>').disabled = false;
}
function toggle_RadDateTimePicker(obj) {
if (obj.checked) {
document.getElementById(
'<%=RadDateTimePicker1.ClientID%>').disabled = false;
}
else
document.getElementById(
'<%=RadDateTimePicker1.ClientID%>').disabled = true;
}
function toggle_TextBox(obj) {
if (obj.checked) {
document.getElementById(
'<%=TextBox1.ClientID%>').disabled = false;
}
else
document.getElementById(
'<%=TextBox1.ClientID%>').disabled = true;
}
</
script>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"
OutputCompression="AutoDetect">
</telerik:RadScriptManager>
<div>
<asp:CheckBox ID="CheckBox1" runat="server" onclick="toggle_RadNumericTextBox(this);" />
<br />
<telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server" >
</telerik:RadNumericTextBox>
<br />
<asp:CheckBox ID="CheckBox2" runat="server" onclick="toggle_RadDateTimePicker(this);"/>
<br />
<telerik:RadDateTimePicker ID="RadDateTimePicker1" Runat="server"
Culture="English (United States)">
</telerik:RadDateTimePicker>
<br />
<asp:CheckBox ID="CheckBox3" runat="server" onclick="toggle_TextBox(this);" />
<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
</div>
Your help is appreciated.
<
form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div style="height:300px; width:400px;overflow:scroll;">
<div style=" height:500px; width:350px">
<table ><tr><td>
<asp:TextBox ID="TextBox1" runat="server" Width="197px"></asp:TextBox>
</td></tr>
<tr><td>
<asp:Button ID="Button1" runat="server" Text="Button" />
</td></tr>
<tr><td>
<rad:RadDatePicker ID="datePikFmCrRangeStart" runat="server" EnableTyping="False" Skin="Default2006" Calendar-EnableMonthYearFastNavigation="false">
<DateInput ReadOnly="True" Skin="Outlook" CssClass="input" runat="server" ID="dateInput2">
</DateInput></rad:RadDatePicker>
</td>
</tr>
<tr>
<td>
<asp:HyperLink ID="HyperLink1" runat="server">HyperLink</asp:HyperLink>
</td>
</tr>
</table>
</div>
</div>
</form>
You can paste this code in a page and can see how the calendar control behaves.
I tried to set the Style="position:relative;" to this control but did not work.
please suggest me some solution.
Regards,
Manoj Dwivedi