Versions Problem

2 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 02 Jun 2008 Link to this post

    hi,

    In my application I was using Telerik.Web.UI.dll version 2007.3.1314.35. Noe i replaced this with your latest version 2008.1.415.35.  and i m getting error in Rad window. It means my rad window gets open but when i click on its Update or cancel Buttons inside it. It throws error :Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().

     I am giving my code below:

    <%

    @ Page Language="C#" MasterPageFile="~/MasterPages/Dialog.Master" AutoEventWireup="true" CodeFile="DetractionStaging_PopUp.aspx.cs" Inherits="DetractionStaging_PopUp" Title="Untitled Page" %>

    <%

    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    <%

    @ Register Assembly="RadTreeView.Net2" Namespace="Telerik.WebControls" TagPrefix="radT" %>

    <%

    @ Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="radC" %>

    <%

    @ Register Src="~/UserControls/WeightDistribution/WeightDistribution.ascx" TagName="WeightDistribution"

    TagPrefix="uc1" %>

    <

    asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <script type="text/javascript">

    function

    handleNodeClick(node)

    {

    //if this is a parent node, expand it and select the first child

    if (node.Parent == null && node.Nodes.length > 0)

    {

    node.Expand();

    node.TreeView.UnSelectAllNodes();

    node.Nodes[0].Select();

    return false;

    }

    // Unlock any locked sliders

    SliderArrays[0][idxSliderLocked] =

    false;

    SliderArrays[1][idxSliderLocked] =

    false;

    SliderArrays[2][idxSliderLocked] =

    false;

    SliderArrays[3][idxSliderLocked] =

    false;

    // Make sliders visible

    SliderArrays[0][idxSliderDisplay] =

    true;

    SliderArrays[1][idxSliderDisplay] =

    true;

    SliderArrays[2][idxSliderDisplay] =

    true;

    SliderArrays[3][idxSliderDisplay] =

    true;

    // Redraw the sliders to reflect the new default values

    SliderArrays[0][idxSliderDisplayWeight] = node.Attributes[

    "DefaultTech"];

    SliderArrays[1][idxSliderDisplayWeight] = node.Attributes[

    "DefaultEquip"];

    SliderArrays[2][idxSliderDisplayWeight] = node.Attributes[

    "DefaultPatient"];

    SliderArrays[3][idxSliderDisplayWeight] = node.Attributes[

    "DefaultProcess"];

    SliderDrawTable();

    // Change the default DV

    var combo = <%= RecursiveFindControl("cboSeverity").ClientID %>;

    var item = combo.FindItemByValue(node.Attributes["DefaultDV"]);

    if (item != null) item.Select();

    // Change the tooltip text

    <%= RecursiveFindControl(

    "lnkTip").ClientID %>.title = node.Attributes["ChangeTip"];   /// I am getting error here.

    return true;

    }

    </script>

    <script type="text/javascript">

    function GetRadWindow()

    {

    var oWindow = null;

    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog

    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz az well)

    return oWindow;

    }

    function CloseAndSend(status)

    {

    GetRadWindow().CallBack(status);

    }

    </script>

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

    <asp:FormView ID="fvDetraction" runat="server" DefaultMode="Insert" DataSourceID="dsDetraction"

    OnItemCommand="fvDetraction_ItemCommand" OnDataBound="fvDetraction_DataBound">

    <EditItemTemplate>

    <h1>

    Edit Detraction

    </h1>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"

    HorizontalAlign="Center" Width="75px">

    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

    style="border: 0px;" />

    </telerik:RadAjaxLoadingPanel>

    <telerik:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" DefaultLoadingPanelID="RadAjaxLoadingPanel1"

    EnablePageHeadUpdate="true" runat="server" EnableHistory="True">

    <AjaxSettings>

    <telerik:AjaxSetting AjaxControlID="tvDetractionTypes">

    <UpdatedControls>

    <telerik:AjaxUpdatedControl ControlID="pnlFaults" />

    </UpdatedControls>

    </telerik:AjaxSetting>

    </AjaxSettings>

    </telerik:RadAjaxManager>

    <table cellpadding="3" style="width: 450px;">

    <tr>

    <td>

    <asp:Label ID="Label9" runat="server" CssClass="labelStyle" Text="Severity"></asp:Label>

    </td>

    <td>

    <radC:RadComboBox ID="cboSeverity" runat="server" Skin="Office2007" DataTextField="Title"

    DataValueField="ID" SkinsPath="~/RadControls/ComboBox/Skins" Width="150px" DataSourceID="dsDValues"

    SelectedValue='<%# Bind("DissatisfactionValueID") %>'>

    </radC:RadComboBox>

    </td>

    <td>

    <asp:Label ID="Label7" runat="server" CssClass="labelStyle" Text="Source of Feeback"></asp:Label>

    </td>

    <td>

    <radC:RadComboBox ID="cboDetractionSource" runat="server" Skin="Office2007">

    </radC:RadComboBox>

    </td>

    </tr>

    <tr>

    <td colspan="2" valign="top">

    <asp:Label ID="Label3" runat="server" CssClass="labelStyle" Text="Detraction Type"></asp:Label>

    <asp:Panel ID="pnlDetractions" Width="250px" runat="server" Style="border: #adc3de solid;

    border-width: 1px;">

    <radT:RadTreeView ID="tvDetractionTypes" OnNodeBound="tvDetractionTypes_NodeBound" runat="server" BeforeClientClick="handleNodeClick" DataFieldParentID="ParentDetractionTypeID"

    Skin="Office2007" DataSourceID="dsDetractionTypes" Height="150px" Width="250px"

    DataTextField="Title" DataFieldID="ID"

    DataValueField="ID">

    </radT:RadTreeView>

    </asp:Panel>

    </td>

    <td colspan="2" valign="top">

    <asp:Panel ID="pnlFaults" runat="server">

    <asp:Label ID="Label10" runat="server" CssClass="labelStyle" Text="Fault Distribution"></asp:Label>

    <uc1:WeightDistribution ID="wdFaults" runat="server" />

    <asp:HyperLink ID="lnkTip" ToolTip="Testing..." runat="server" Style="float: right;

    margin-top: -10px;"

    CssClass="labelStyle">

    <asp:Image ID="Image1" runat="server" ImageAlign="Middle" ImageUrl="~/Images/icons/16/help.png" />&nbsp;<asp:Label

    ID="imgTip" runat="server" CssClass="labelStyle" Style="font-size: smaller;"

    Text="When should I change this?"></asp:Label></asp:HyperLink>

    </asp:Panel>

    </td>

    </tr>

    <tr>

    <td colspan="4">

    <asp:Label ID="Label11" runat="server" CssClass="labelStyle" Text="Remarks"></asp:Label><br />

    <telerik:RadEditor ID="edtRemarks" runat="server" EditModes="Design" Skin="Telerik"

    Width="620" Height="150" ToolsFile="~/App_Data/BasicToolbar.xml">

    <Content></Content>

    <SpellCheckSettings SpellCheckProvider="PhoneticProvider" WordIgnoreOptions="None" />

    </telerik:RadEditor>

    </td>

    </tr>

    <tr>

    <td colspan="4">

    <div style="text-align: right; margin-top: 5px;">

    <asp:Button ID="cmdUpdate" runat="server" Text="Update" CommandName="Update" />

    <asp:Button ID="cmdCancel" runat="server" Text="Cancel" CausesValidation="False"

    CommandName="Cancel" />

    </div>

    </td>

    </tr>

    </table>

    <asp:SqlDataSource ID="dsDValues" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString%>"

    SelectCommand="SELECT [ID], [Title] FROM [DissatisfactionValue]">

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="dsDetractionSources" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString%>"

    SelectCommand="qmsLookupRadiologist" SelectCommandType="StoredProcedure">

    <SelectParameters>

    <asp:SessionParameter DefaultValue="3" Name="accountID" SessionField="AccountID"

    Type="Int32" />

    </SelectParameters>

    </asp:SqlDataSource>

    <asp:SqlDataSource ID="dsDetractionTypes" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString%>"

    SelectCommand="SELECT ID, Title, ParentDetractionTypeID, Description, ChangeDescription, DefaultDissatisfactionValueID, DefaultTechnologistFault, DefaultPatientFault, DefaultEquipmentFault, DefaultProcessFault FROM DetractionType"

    CacheDuration="6000" EnableCaching="False">

    <SelectParameters>

    </SelectParameters>

    </asp:SqlDataSource>

    </EditItemTemplate>

    </asp:FormView>

    <asp:SqlDataSource ID="dsDetraction" runat="server" ConnectionString="<%$ ConnectionStrings:QMS_DataStoreConnectionString %>"

    SelectCommand="proc_DetractionStaging_qmsSelectDetractionByID" SelectCommandType="StoredProcedure"

    OnUpdating="dsDetraction_Updating" UpdateCommand="proc_DetractionStaging_qmsUpdateDetraction" UpdateCommandType="StoredProcedure" >

    <SelectParameters>

    <asp:QueryStringParameter Name="ID" QueryStringField="id" Type="Int32" />

    </SelectParameters>

    <UpdateParameters>

    <asp:QueryStringParameter Name="AccessionCode" QueryStringField="AccessionCode" Type="Int32" />

    <asp:Parameter Name="DetractionTypeID" Type="Int32" />

    <asp:Parameter Name="DissatisfactionValueID" Type="Int32" />

    <asp:Parameter Name="TechnologistFault" Type="Decimal" />

    <asp:Parameter Name="EquipmentFault" Type="Decimal" />

    <asp:Parameter Name="PatientFault" Type="Decimal" />

    <asp:Parameter Name="ProcessFault" Type="Decimal" />

    <asp:Parameter Name="JournalEntryText" Type="String" />

    <asp:QueryStringParameter Name="ID" QueryStringField="id" Type="Int32" />

    <asp:QueryStringParameter Name="StagedID" QueryStringField="id" Type="Int32" />

    </UpdateParameters>

    </asp:SqlDataSource>

    </

    asp:Content>

    ......................................aspx.cs................

    using

    System;

    using

    System.Collections;

    using

    System.Configuration;

    using

    System.Data;

    using

    System.Linq;

    using

    System.Web;

    using

    System.Web.Security;

    using

    System.Web.UI;

    using

    System.Web.UI.HtmlControls;

    using

    System.Web.UI.WebControls;

    using

    System.Web.UI.WebControls.WebParts;

    using

    System.Xml.Linq;

    using

    Telerik.Web.UI;

    using

    Telerik.WebControls;

    using

    QAISys.Filters;

    public

    partial class DetractionStaging_PopUp : QMSDialog

    {

    protected override void OnPreRender(EventArgs e)

    {

    base.OnPreRender(e);

    if (fvDetraction.CurrentMode == FormViewMode.Edit)

    {

    }

    RegisterTreeviewScrollStartup(RecursiveFindControl(

    "tvDetractionTypes"));

    }

    protected override void OnLoad(EventArgs e)

    {

    if (!IsPostBack)

    {

    FormViewMode currentFVM = fvDetraction.DefaultMode;

    if (string.IsNullOrEmpty(Request["id"]))

    fvDetraction.ChangeMode(

    FormViewMode.Insert);

    else

    fvDetraction.ChangeMode(

    FormViewMode.Edit);

    if (fvDetraction.CurrentMode != currentFVM) DataBind();

    //{

    // //Filters f = new Filters();

    // //DataSet ds = new DataSet();

    // //f.proc_DetractionStaging_qmsSelectDetractionByID(ref ds, 41);

    // //fvDetraction.DataSource = ds;

    // //fvDetraction.DataBind();

    //}

    ((

    UserControls_WeightDistribution)RecursiveFindControl("wdFaults")).ShowInitalValues = fvDetraction.CurrentMode == FormViewMode.Edit;

    }

    }

    protected void tvDetractionTypes_NodeBound(object sender, Telerik.WebControls.RadTreeNodeEventArgs e)

    {

    e.NodeBound.Attributes.Add(

    "ChangeTip", ((DataRowView)e.NodeBound.DataItem)["ChangeDescription"].ToString());

    e.NodeBound.Attributes.Add(

    "DefaultDV", ((DataRowView)e.NodeBound.DataItem)["DefaultDissatisfactionValueID"].ToString());

    e.NodeBound.Attributes.Add(

    "DefaultTech", ((DataRowView)e.NodeBound.DataItem)["DefaultTechnologistFault"].ToString());

    e.NodeBound.Attributes.Add(

    "DefaultEquip", ((DataRowView)e.NodeBound.DataItem)["DefaultEquipmentFault"].ToString());

    e.NodeBound.Attributes.Add(

    "DefaultProcess", ((DataRowView)e.NodeBound.DataItem)["DefaultProcessFault"].ToString());

    e.NodeBound.Attributes.Add(

    "DefaultPatient", ((DataRowView)e.NodeBound.DataItem)["DefaultPatientFault"].ToString());

    }

    protected void fvDetraction_ItemCommand(object sender, FormViewCommandEventArgs e)

    {

    if (e.CommandName == "Update")

    {

    string status = "true";

    ScriptManager.RegisterStartupScript(this, GetType(), "script", "<script type='text/javascript' language='javascript'>CloseAndSend('true');</script>", false);

    //ClientScript.RegisterStartupScript(this.GetType(), "script", "CloseAndbind('true');", true);

    }

    else if (e.CommandName == "Insert")

    ClientScript.RegisterStartupScript(

    this.GetType(), "scriptCloseAndRebind", "CloseAndRebind(true);", true);

    else

    ClientScript.RegisterStartupScript(

    this.GetType(), "scriptCancelEdit", "CancelEdit();", true);

    }

    protected void dsDetraction_Inserting(object sender, SqlDataSourceCommandEventArgs e)

    {

    updateFieldValues(e);

    }

    protected void dsDetraction_Updating(object sender, SqlDataSourceCommandEventArgs e)

    {

    updateFieldValues(e);

    }

    private void updateFieldValues(SqlDataSourceCommandEventArgs e)

    {

    e.Command.Parameters[

    "@JournalEntryText"].Value = ((Telerik.Web.UI.RadEditor)RecursiveFindControl("edtRemarks")).Content;

    UserControls_WeightDistribution wdFaults = RecursiveFindControl("wdFaults") as UserControls_WeightDistribution;

    e.Command.Parameters[

    "@TechnologistFault"].Value = wdFaults.TechnologistFault;

    e.Command.Parameters[

    "@ProcessFault"].Value = wdFaults.ProcessFault;

    e.Command.Parameters[

    "@PatientFault"].Value = wdFaults.PatientFault;

    e.Command.Parameters[

    "@EquipmentFault"].Value = wdFaults.EquipmentFault;

    //e.Command.Parameters["@CurrentUser"].Value = Membership.GetUser().UserName;

    e.Command.Parameters[

    "@DetractionTypeID"].Value = ((Telerik.WebControls.RadTreeView)RecursiveFindControl("tvDetractionTypes")).SelectedNode.Value;

    }

    protected void fvDetraction_DataBound(object sender, EventArgs e)

    {

    if (!IsPostBack && fvDetraction.CurrentMode == FormViewMode.Edit)

    {

    Telerik.WebControls.

    RadTreeNode node = ((Telerik.WebControls.RadTreeView)RecursiveFindControl("tvDetractionTypes")).FindNodeByValue(((DataRowView)fvDetraction.DataItem)["ID"].ToString());

    if (node != null)

    {

    node.Selected =

    true;

    node.ExpandParentNodes();

    }

    ((Telerik.Web.UI.

    RadEditor)RecursiveFindControl("edtRemarks")).Content = ((DataRowView)fvDetraction.DataItem)["Feedback"].ToString();

    UserControls_WeightDistribution wdFaults = RecursiveFindControl("wdFaults") as UserControls_WeightDistribution;

    wdFaults.EquipmentFault = ((

    DataRowView)fvDetraction.DataItem)["EquipmentFault"] as decimal?;

    wdFaults.ProcessFault = ((

    DataRowView)fvDetraction.DataItem)["ProcessFault"] as decimal?;

    wdFaults.PatientFault = ((

    DataRowView)fvDetraction.DataItem)["PatientFault"] as decimal?;

    wdFaults.TechnologistFault = ((

    DataRowView)fvDetraction.DataItem)["TechnologistFault"] as decimal?;

    }

    }

    }

    Please help..

  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 04 Jun 2008 Link to this post

    Hello Rahul,

    I tried to run your code but unfortunately to no avail - I had to comment most of it and I was not able to reproduce the problem.

    Please, open a new support ticket and attach a sample, fully running project (including a sample DB, user control, etc) there. Once I am able to run the project and reproduce the problem, I will do my best to help.


    All the best,
    Svetlina
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top