<table cellspacing="0" class="rcTable rcSingle" summary="Table holding date picker control for selection of dates." style="width:100%;"> <caption style="display:none;"> RadDatePicker </caption><thead style="display:none;"> <tr> <th scope="col"></th> </tr> </thead><tbody> <tr> <td class="rcInputCell" style="width:100%;"><span id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput_wrapper" class="riSingle RadInput " style="display:block;width:100%;"><input id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput" name="ctl00$BC$G1$GD$ctl00$ctl06$RDIPDate$dateInput" class="riTextBox riEnabled" type="text" /><input id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput_ClientState" name="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_dateInput_ClientState" type="hidden" /></span></td> <td><a title="Open the calendar popup." href="#" id="ctl00_BC_G1_GD_ctl00_ctl06_RDIPDate_popupButton" class="rcCalPopup">Open the calendar popup.</a></td> </tr> </tbody> </table>protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == "PerformInsert" || e.CommandName == "Update") { //some code block if (Session["idSess"] == null) { objBz.Insert(objEntity); e.Canceled = false; } else { objBz.Update(objEntity); RadGrid1.MasterTableView.ClearEditItems(); } }<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" ShowStatusBar="true" runat="server" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" AutoGenerateColumns="false" ClientSettings-Resizing-AllowColumnResize="true" DataKeyNames="CarrierNetID" OnItemDataBound="RadGrid_ItemDataBound"> <MasterTableView PageSize="10" Width="100%"> <Columns> <telerik:GridBoundColumn DataField="CarrierNetID" Visible="false" UniqueName="CarrierNetID" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Name" HeaderText="Carrier Name" UniqueName="Name" SortExpression="Name" ReadOnly="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Region" HeaderText="Region" UniqueName="Region" AllowFiltering="true" SortExpression="Region" ReadOnly="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Country" HeaderText="Country" UniqueName="Country" SortExpression="Country" ReadOnly="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn HeaderText="PLMN" UniqueName="PLMN"> <ItemTemplate> <asp:HyperLink ID="lnkPLMN" runat="server" Target="_blank" ForeColor="Blue"> </asp:HyperLink> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="TechnologyTypeCode" HeaderText="Technology" UniqueName="TechnologyTypeCode" SortExpression="TechnologyTypeCode" ReadOnly="true" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SMSMORate" HeaderText="SSMSO Rate" UniqueName="SMSMORate" AllowFiltering="false" SortExpression="SMSMORate" ReadOnly="true" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="SMSMTRate" HeaderText="SMSMT Rate" UniqueName="SMSMTRate" AllowFiltering="false" SortExpression="SMSMTRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DataRate" HeaderText="Data Rate" UniqueName="DataRate" AllowFiltering="false" SortExpression="DataRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MOCRate" HeaderText="MOC Rate" UniqueName="MOCRate" AllowFiltering="false" SortExpression="MOCRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="MTCRate" HeaderText="MTC Rate" UniqueName="MTCRate" AllowFiltering="false" SortExpression="MTCRate" ReadOnly="true" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:G}"> </telerik:GridBoundColumn> <telerik:GridCheckBoxColumn DataField="FlatRate" HeaderText="Flat Rate" UniqueName="FlatRate" SortExpression="FlatRate" ReadOnly="true" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridCheckBoxColumn> <telerik:GridCheckBoxColumn DataField="Discount" HeaderText="Discount" UniqueName="Discount" SortExpression="Discount" ReadOnly="true" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridCheckBoxColumn> <telerik:GridCheckBoxColumn DataField="ActiveFlag" HeaderText="Active" UniqueName="ActiveFlag" SortExpression="ActiveFlag" ReadOnly="true" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridCheckBoxColumn> </Columns> </MasterTableView> <ClientSettings EnableRowHoverStyle="true"> </ClientSettings> <PagerStyle Mode="NumericPages"></PagerStyle> </telerik:RadGrid>HyperLink link = (HyperLink)item["PLMN"].Controls[0];
protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridDataItem) { GridDataItem item = (GridDataItem)e.Item; HyperLink link = (HyperLink)item["PLMN"].Controls[0]; string value = item.GetDataKeyValue("CarrierNetID").ToString(); link.NavigateUrl = "~/CarrierLaunchStatusForm.aspx?addRecord=0&ID=" + value; } }Iv'e seen examples of the telerik:AjaxSetting and telerik:RadAjaxLoadingPanel so I thought I would try it out in stead of using the standard Ajax update panel.
For the most part it works ok, even mixing it up with standard Ajax like collapse panels. I came across an issue where setting up a Control to be updated by its own onTextChanged Event, I got a funky java script error. It doess't prevent the control form being updated it just throws an exception.
here is the tag in question:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" >
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="TextBox_capacity">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="TextBox_capacity" />
</UpdatedControls>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> </telerik:AjaxSetting>
I have others of course but this one throws the exception. Not Sure why. It works just fine once you click past the exception.
Line: 157
Error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: panelsCreated[12]
And when I debug:
$type.registerClass('Sys.WebForms.InitializeRequestEventArgs', Sys.CancelEventArgs);
$type = Sys.WebForms.PageLoadedEventArgs = function PageLoadedEventArgs(panelsUpdated, panelsCreated, dataItems) {
/// <summary locid="M:J#Sys.WebForms.PageLoadedEventArgs.#ctor">The arguments for the PageRequestManager's pageLoaded event. The pageLoaded event is raised after the DOM has been updated.</summary>
/// <param name="panelsUpdated" type="Array">An array of UpdatePanels that were updated.</param>
/// <param name="panelsCreated" type="Array">An array of UpdatePanels that were created.</param>
/// <param name="dataItems" type="Object" mayBeNull="true"></param>
var e = Function._validateParams(arguments, [
{name: "panelsUpdated", type: Array},
{name: "panelsCreated", type: Array},
{name: "dataItems", type: Object, mayBeNull: true}
]);
if (e) throw e;
Sys.WebForms.PageLoadedEventArgs.initializeBase(this);
this._panelsUpdated = panelsUpdated;
this._panelsCreated = panelsCreated;
this._dataItems = dataItems || new Object();
}
I'm sure I'm missing something simple...........