Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
183 views
hi,
I am getting an exception at

 

 

this.pnlprdDes.RenderControl(htmlWriterForPrdtLst); 

that
"Script control 'dgPrd' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl"

For this I tried to set the RegisterWithScriptManager property of the RadGrid to "False". Then I did not get any exception, but the control is not going back to a registered java script. Please help me in resolving this issue.

Thanks,
Sudha.

 

Vasil
Telerik team
 answered on 08 Jul 2011
1 answer
98 views
<%@ Page Title="Diagnosis Code Maintanance " Language="C#" MasterPageFile="~/MasterPages/Site.master"
    AutoEventWireup="true" CodeFile="Diagnosis.aspx.cs" Inherits="Codes_Diagnosis"
    EnableTheming="true" Theme="DefaultTheme" %>
 
<%@ Register TagPrefix="MyCtrl" Namespace="CBR.Business" Assembly="CBR.Business" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <script language="javascript" type="text/javascript">
        function clearData() {
            document.getElementById('<%=txtcode.ClientID%>').value = '';
            document.getElementById('<%=txtDescription.ClientID%>').value = '';
            document.getElementById('<%=hdnPK.ClientID%>').value = '';
            document.getElementById('<%=chkUserEntered.ClientID%>').checked = false;
            document.getElementById('<%=chkActive.ClientID%>').checked = false;
            document.getElementById('<%=txtcode.ClientID%>').disabled = false;
            document.getElementById('<%=txtcode.ClientID%>').focus();
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Outlook" runat="server" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <table width="100%" cellpadding="0px" cellspacing="0px" border="0px">
            <tr>
                <td width="100%">
                    <!-- Top Pane Start -->
                    <div class="BillReviewContainer">
                        <div class="PanelTitle">
                            <div class="PanelTitleIcon">
                                Diagnosis</div>
                        </div>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="BillReviewTab">
                            <tr>
                                <td width="15%" align="right">
                                    <asp:Label ID="lblCode" SkinID="Required" runat="server" Text="Code:"></asp:Label>
                                </td>
                                <td width="85%">
                                    <asp:TextBox ID="txtcode" MaxLength="6" SkinID="Small" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvCode" ValidationGroup="Submit" runat="server"
                                        ControlToValidate="txtcode"  SetFocusOnError="true" ErrorMessage="Code is mandatory" Display="None"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revCode" ValidationExpression="(^[+]?\w*\.?\d*[1-9]+\d*$)|(^[+]?[1-9]+\d*\.\d*$)"
                                        runat="server" ValidationGroup="Submit" Display="None" ControlToValidate="txtcode"  SetFocusOnError="true"
                                        ErrorMessage="Only numeric or alphabates are allowed.i.e. e1.23,0.12,121"></asp:RegularExpressionValidator>
                                    <asp:HiddenField ID="hdnPK" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" valign="top">
                                    <asp:Label ID="lblDescription" SkinID="Required" runat="server" Text="Description:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDescription" TextMode="MultiLine" SkinID="Multiline" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvDesc" ValidationGroup="Submit" runat="server"
                                        ControlToValidate="txtDescription" SetFocusOnError="true" ErrorMessage="Description is mandatory" Display="None"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td valign="middle">
                                    <asp:CheckBox ID="chkUserEntered" runat="server" Text=" User entered" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td valign="middle">
                                    <asp:CheckBox ID="chkActive" runat="server" Text=" Active" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:Button ID="btnSave" OnClick="btnSave_Click" SkinID="InnerSaveButton" ValidationGroup="Submit"
                                        runat="server" />
                                    <asp:Button ID="btnCancel" runat="server" SkinID="InnerClearButton" OnClientClick="return clearData();" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Label ID="lblMsg" ForeColor="Red" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:ValidationSummary ID="vs" HeaderText="Please enter following fields" DisplayMode="BulletList"
                                        runat="server" ValidationGroup="Submit" CssClass="msg" ForeColor="Red" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!-- Top Pane Ends -->
                    <!-- Second Pane Start -->
                    <div class="PrevsBillsContainer">
                        <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="100%">
                            <Items>
                                <telerik:RadPanelItem Text="Diagnosis" CssClass="PrevsBillsHeader" ImageUrl="~/App_Themes/DefaultTheme/img/previous_bill_icon.png">
                                    <ContentTemplate>
                                        <telerik:RadGrid ID="grdDiagnosis" OnInit="grdDiagnosis_Init" OnItemDataBound="grdDiagnosis_DataBound"
                                            runat="server" AllowAutomaticDeletes="false" OnPreRender="grdDiagnosis_PreRender"
                                            SkinID="ContentGrid" OnItemCommand="grdDiagnosis_ItemCommand">
                                            <MasterTableView TableLayout="Fixed" AllowMultiColumnSorting="true" DataKeyNames="di_int_pk">
                                                <SortExpressions>
                                                    <telerik:GridSortExpression FieldName="di_DiagCode" SortOrder="Ascending" />
                                                </SortExpressions>
                                                <Columns>
                                                    <telerik:GridBoundColumn HeaderText="Diagnosis Code" UniqueName="Code" AutoPostBackOnFilter="true"
                                                        ShowFilterIcon="false" CurrentFilterFunction="StartsWith" DataField="di_DiagCode"
                                                        HeaderStyle-Width="14%" ItemStyle-Width="14%">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridBoundColumn HeaderText="Description" AutoPostBackOnFilter="true" ShowFilterIcon="false"
                                                        UniqueName="Description" CurrentFilterFunction="StartsWith" DataField="di_DiagDescription">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridCheckBoxColumn DataField="di_User" FilterListOptions="VaryByDataType"
                                                        HeaderText="User entered" CurrentFilterFunction="NoFilter" UniqueName="Userentered"
                                                        HeaderStyle-Width="10%" ItemStyle-Width="10%">
                                                    </telerik:GridCheckBoxColumn>
                                                    <telerik:GridCheckBoxColumn DataField="di_Active" FilterListOptions="VaryByDataType"
                                                        HeaderText="Active" CurrentFilterFunction="NoFilter" UniqueName="Active" HeaderStyle-Width="6%"
                                                        ItemStyle-Width="6%"  Resizable="false">
                                                    </telerik:GridCheckBoxColumn>
                                                    <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="40px" ItemStyle-Width="40px"  Resizable="false">
                                                        <ItemStyle HorizontalAlign="Center" />
                                                        <ItemTemplate>
                                                            <%-- <asp:LinkButton ID="LinkButton1" runat="server" Text="Edit" CommandName="Show"></asp:LinkButton>--%>
                                                            <asp:ImageButton ID="ImgEdit" runat="server" AlternateText="Edit" CommandName="Show"
                                                                ImageUrl="~/Images/edit_icon.png" />
                                                            <asp:HiddenField ID="hdnID" runat="server" Value='<%# Eval("di_int_pk") %>' />
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridButtonColumn ConfirmText="Do you want to delete this entry?" ConfirmDialogType="RadWindow"
                                                        ConfirmTitle="Delete" CommandName="Delete" Text="Delete" ButtonType="ImageButton"
                                                        ImageUrl="~/Images/delete_icon.png" UniqueName="DeleteColumn" HeaderStyle-Width="40px"
                                                        ItemStyle-Width="40px" Resizable="false">
                                                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                                                    </telerik:GridButtonColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </telerik:RadGrid>
                                    </ContentTemplate>
                                </telerik:RadPanelItem>
                            </Items>
                            <CollapseAnimation Duration="100" Type="None" />
                            <ExpandAnimation Duration="100" Type="None" />
                        </telerik:RadPanelBar>
                    </div>
                    <!-- Second Pane Ends -->
                </td>
            </tr>
        </table>
    </telerik:RadAjaxPanel>
</asp:Content>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Collections;
using System.Web.UI.WebControls;
using CBR.Business;
using CBR.DataModel;
using System.Data;
using Telerik.Web.UI;

public partial class Codes_Diagnosis : System.Web.UI.Page
{

    #region Page Events

    /// <summary>
    /// Page Load event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            txtcode.Focus();
            Bind();
            if (RadPanelBar1.Items.Count > 0)
                RadPanelBar1.Items[0].Expanded = true;
        }
    }

    #endregion

    #region Functions

    /// <summary>
    /// Bind grid
    /// </summary>
    private void Bind()
    {
        List<Diagnostic> objDiagnostic = CodesManager.GetAllDiagnosis();
        //grdDiagnosis.VirtualItemCount = objServices.Count;
        grdDiagnosis.DataSource = objDiagnostic;
        grdDiagnosis.DataBind();

    }

    /// <summary>
    /// Clear all fields
    /// </summary>
    private void ClearAll()
    {
        txtcode.Text = "";
        txtDescription.Text = "";
        chkUserEntered.Checked = false;
        chkActive.Checked = false;
        txtcode.Enabled = true;
        txtcode.Focus();
    }

    #endregion

    #region Grid events

    /// <summary>
    /// Grid Prerender event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void grdDiagnosis_PreRender(object sender, System.EventArgs e)
    {
        Bind();
    }

    /// <summary>
    /// Actions to perform for different commands
    /// </summary>
    /// <param name="source"></param>
    /// <param name="e"></param>
    protected void grdDiagnosis_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == RadGrid.InitInsertCommandName) //"Add new" button clicked
        {

        }
        else if (e.CommandName == RadGrid.DeleteCommandName)
        {
            lblMsg.Text = "";
            GridDataItem editedItem = (GridDataItem)e.Item;
            int ID = Convert.ToInt32(((HiddenField)editedItem.FindControl("hdnID")).Value);
            CodesManager.DeleteDiagnosticByID(ID);
            ClearAll();
            Bind();
        }

        else if (e.CommandName == "Show")
        {
            lblMsg.Text = "";
            GridDataItem selectedItem = (GridDataItem)e.Item;
            Hashtable selectedItemValues = new Hashtable();
            selectedItem.ExtractValues(selectedItemValues);
            if (!Convert.ToBoolean(selectedItemValues["di_User"]))
            {
                txtcode.Enabled = false;
                txtDescription.Focus();
            }
            else
            {
                txtcode.Focus();
            }
            txtcode.Text = selectedItemValues["di_DiagCode"].ToString().Trim();
            txtDescription.Text = selectedItemValues["di_DiagDescription"].ToString().Trim();
            chkUserEntered.Checked = Convert.ToBoolean(selectedItemValues["di_User"]);
            chkActive.Checked = Convert.ToBoolean(selectedItemValues["di_Active"]);
            hdnPK.Value = ((HiddenField)selectedItem.FindControl("hdnID")).Value;

        }
    }

    /// <summary>
    /// Hide Top command row
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void grdDiagnosis_DataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridCommandItem)
        {
            GridCommandItem cmditm = (GridCommandItem)e.Item;
            cmditm.FindControl("RefreshButton").Visible = false;//hide the text
            cmditm.FindControl("RebindGridButton").Visible = false;//hide the image
            e.Item.FindControl("InitInsertButton").Visible = false;//hide Add text
            e.Item.FindControl("AddNewRecordButton").Visible = false;//hide add button
            e.Item.Visible = false; // hide Top command row
        }
    }

    /// <summary>
    /// Init event to hide filter options from checkbox field filter
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void grdDiagnosis_Init(object sender, System.EventArgs e)
    {
        GridFilterMenu menu = grdDiagnosis.FilterMenu;
        int i = 0;

        while (i < menu.Items.Count)
        {
            if (menu.Items[i].Text == "NoFilter" || menu.Items[i].Text == "EqualTo")
            {
                i++;
            }
            else
            {
                menu.Items.RemoveAt(i);
            }
        }

    }

    #endregion

    # region Events

    protected void btnSave_Click(object sender, EventArgs e)
    {
        Diagnostic objDiagnostic = new Diagnostic();
        objDiagnostic.di_DiagCode = txtcode.Text;
        objDiagnostic.di_DiagDescription = txtDescription.Text;
        objDiagnostic.di_User = chkUserEntered.Checked;
        objDiagnostic.di_Active = chkActive.Checked;
        lblMsg.Text = "";
        if (hdnPK.Value == "")
        { // Insert
            if (CodesManager.GetDiagnosisByCode(txtcode.Text).Count > 0)
            {

                lblMsg.Text = "Diagnosis Code already exists";
                return;
            }
            else
            {
                objDiagnostic.di_Type = "";
                objDiagnostic.di_MajorDiagGrouping = "";
                objDiagnostic.di_Catastrophic = false;
                CodesManager.InsertDiagnostic(objDiagnostic);
                lblMsg.Text = "Diagnosis Code added successfully";
                txtcode.Enabled = true;
            }
        }
        else
        // Update
        {
            objDiagnostic.di_int_pk = Convert.ToInt32(hdnPK.Value);
            CodesManager.UpdateDiagnostic(objDiagnostic);
            //btnSave.Text = "Insert";
        }
        hdnPK.Value = "";
        ClearAll();
    }

    protected void btnCancel_Click(object sender, EventArgs e)
    {
        hdnPK.Value = "";
        ClearAll();
        lblMsg.Text = "";

    }

    #endregion

}


#region Diagnosis
        public static List<Diagnostic> GetAllDiagnosis()
        {


            List<Diagnostic> objDiagnostic = new List<Diagnostic>();

            try
            {
                objDiagnostic = CodesData.GetAllDiagnosis();
            }
            catch (Exception ex)
            {
                LogManager.GetLogger("Business-CodesManager-GetAllDiagnosis").Error(ex);
                throw ex;
            }

            return objDiagnostic;
        }

        public static List<Diagnostic> GetDiagnosisByCode(string Code)
        {
            List<Diagnostic> objDiagnostic = new List<Diagnostic>();

            try
            {
                objDiagnostic = CodesData.GetDiagnosisByCode(Code);
            }
            catch (Exception ex)
            {
                LogManager.GetLogger("Business-CodesManager-GetDiagnosisByCode").Error(ex);
                throw ex;
            }

            return objDiagnostic;
        }

        public static void InsertDiagnostic(Diagnostic objDiagnostic)
        {
            try
            {
                CodesData.AddDiagnosis(objDiagnostic);
            }
            catch (Exception ex)
            {
                LogManager.GetLogger("Business-CodesManager-InsertDiagnostic").Error(ex);
                throw ex;
            }
        }

        public static void UpdateDiagnostic(Diagnostic objDiagnostic)
        {
            try
            {
                CodesData.UpdateDiagnosisByID(objDiagnostic);
            }
            catch (Exception ex)
            {
                LogManager.GetLogger("Business-CodesManager-UpdateDiagnostic").Error(ex);
                throw ex;
            }
        }

        public static void DeleteDiagnosticByID(Int32 ID)
        {
            try
            {
                CodesData.DeleteDiagnosisByID(ID);
            }
            catch (Exception ex)
            {
                LogManager.GetLogger("Business-CodesManager-DeleteDiagnosticByID").Error(ex);
                throw ex;
            }
        }

        #endregion


 public static Diagnostic AddDiagnosis(Diagnostic objDiagnosis)
        {
            using (CBREntities CBRContext = new CBREntities())
            {
                CBRContext.Connection.Open();
                DbTransaction objTrans = CBRContext.Connection.BeginTransaction();

                try
                {

                    CBRContext.AddToDiagnostics(objDiagnosis);
                    CBRContext.SaveChanges();
                    objTrans.Commit();

                }
                catch (Exception ex)
                {
                    LogManager.GetLogger("DataAccess-CodesDAL-AddDiagnosis").Error(ex);
                    objTrans.Rollback();
                    throw ex;
                }
            }
            return objDiagnosis;
        }

        public static List<Diagnostic> GetDiagnosisByCode(string Code)
        {
            using (CBREntities CBRContext = new CBREntities())
            {
                CBRContext.Connection.Open();
                DbTransaction objTrans = CBRContext.Connection.BeginTransaction();
                try
                {
                    List<Diagnostic> resultList =
                    (from ServieList in CBRContext.Diagnostics
                     where ServieList.di_DiagCode == Code
                     select ServieList).ToList();
                    objTrans.Commit();
                    return resultList;

                }
                catch (Exception ex)
                {
                    objTrans.Rollback();
                    LogManager.GetLogger("DataAccess-CodesDAL-GetDiagnosisByCode").Error(ex);
                    throw ex;
                }

            }
        }

        public static List<Diagnostic> GetAllDiagnosis()
        {
            CBREntities objCBREntities = new CBREntities();
            objCBREntities.Connection.Open();
            List<Diagnostic> objStateInfo = new List<Diagnostic>();
            DbTransaction objTrans = objCBREntities.Connection.BeginTransaction();

            try
            {
                objStateInfo = objCBREntities.Diagnostics.Select(row => row).ToList();
                objTrans.Commit();

            }
            catch (Exception ex)
            {
                LogManager.GetLogger("DataAccess-CodesDAL-GetAllDiagnosis").Error(ex);
                objTrans.Rollback();
                throw ex;
            }

            return objStateInfo;
        }

        public static void UpdateDiagnosis(Diagnostic objDiagnosis)
        {
            EntityKey key = null;
            object original = null;

            using (CBREntities CBRContext = new CBREntities())
            {
                CBRContext.Connection.Open();
                DbTransaction objTrans = CBRContext.Connection.BeginTransaction();

                try
                {
                    key = CBRContext.CreateEntityKey("Diagnostics", objDiagnosis);
                    if (CBRContext.TryGetObjectByKey(key, out original))
                    {
                        CBRContext.ApplyCurrentValues(key.EntitySetName, objDiagnosis);
                    }
                    CBRContext.SaveChanges();
                    objTrans.Commit();

                }
                catch (Exception ex)
                {

                    objTrans.Rollback();
                    LogManager.GetLogger("DataAccess-CodesDAL-UpdateDiagnosis").Error(ex);
                    throw ex;
                }
            }
        }

        public static void UpdateDiagnosisByID(Diagnostic objDiagnosis)
        {
            using (CBREntities CBRContext = new CBREntities())
            {
                CBRContext.Connection.Open();
                DbTransaction objTrans = CBRContext.Connection.BeginTransaction();

                Diagnostic resultList =
                    (from ServieList in CBRContext.Diagnostics
                     where ServieList.di_int_pk == objDiagnosis.di_int_pk
                     select ServieList).FirstOrDefault();
                resultList.di_DiagCode = objDiagnosis.di_DiagCode;
                resultList.di_DiagDescription = objDiagnosis.di_DiagDescription;
                resultList.di_Active = objDiagnosis.di_Active;
                resultList.di_User = objDiagnosis.di_User;
                try
                {
                    CBRContext.SaveChanges();
                    objTrans.Commit();

                }
                catch (Exception ex)
                {
                    objTrans.Rollback();

                    LogManager.GetLogger("DataAccess-CodesDAL-UpdateDiagnosisByID").Error(ex);
                    throw ex;
                }
            }

        }

        public static void DeleteDiagnosisByID(Int32 ID)
        {
            using (CBREntities CBRContext = new CBREntities())
            {
                CBRContext.Connection.Open();
                DbTransaction objTrans = CBRContext.Connection.BeginTransaction();

                Diagnostic resultList =
                    (from UserList in CBRContext.Diagnostics
                     where UserList.di_int_pk == ID
                     select UserList).FirstOrDefault();

                CBRContext.DeleteObject(resultList);

                try
                {
                    CBRContext.SaveChanges();
                    objTrans.Commit();

                }
                catch (Exception ex)
                {
                    objTrans.Rollback();

                    LogManager.GetLogger("DataAccess-CodesDAL-DeleteDiagnosisByID").Error(ex);
                    throw ex;
                }
            }
        }

        #endregion
Bhanu
Top achievements
Rank 1
 answered on 08 Jul 2011
7 answers
254 views
Hi,

We have two extremly important requirements as below :

1.   To show the count of appointments in monthly view. Is there some way that we can customize the text in 'more' link to show the count of appointments (like in google calendars they show the count of appointments for that day) ?

2. We need to add another 'Agenda' view like in google calendars. How to do that seamlessly with consistent look and feel as existing views ?

Would really appreciate if we could have answers to the above asap.
Also, for both the above would it be a feasible option to extend the source code and use the control once we buy the licencsed version of the product and have access to the code ?

Thanks,
Sandeep
Peter
Telerik team
 answered on 08 Jul 2011
1 answer
108 views
I found this tip in another forum post:
----------------------
      http://www.telerik.com/community/forums/aspnet/window/forms-authentication.aspx#454784

     >If I understand you correctly you wish to redirect the parent page to your login one once the session expires. If this
      is the case, our suggestion is to add the following code to your Login page

      if (window != window.top) window.top.navigate(window.location.href); (IE only)
       OR
      if (window != window.top) window.top.location.href = window.location.href; (cross-browser)

    This code makes sure that the Login page loads in the top browser window, even if it is initially loaded in one of the
     RadWindow  objects.
----------------------

I do a reasonable amount of Javascript coding here and there, but nothing with window management. Into what event would I insert this code snip? Could you give a more complete code sample?

Thanks.
Marin Bratanov
Telerik team
 answered on 08 Jul 2011
1 answer
81 views
Hi all,

I have a Email column which uses "telerik:GridTemplateColumn".
Normally, my customer often copies email from existed emails when create a new record.
But when copy & paste, it includes the space at the end which causes error because of email validation.
This one doesn't happen with telerik:GridBoundColumn".
I mean there is no space at the end when highlight if use telerik:GridBoundColumn
Are there any ways to fix it?

Thanks.

Andy.
Tsvetina
Telerik team
 answered on 08 Jul 2011
2 answers
99 views
We have a Click Event that calls

RadAjaxManager1.ResponseScripts.Add(

"btnBankingAlertClick()");

This opens a radwindow as below

function

btnBankingAlertClick() {

var oWnd = radopen("Dialogs/Alert.aspx?ftn=6", "GenericDialogWindow");

}

 

In ClientClose we pick up the argument and call

 

if(arg.res) AjaxPostback('EndCollection:');

In RadAjaxManager_AjaxRequest a method is called and as part of that the following lines are called
 

RadAjaxManager1.Alert("Collection information inserted into banking sucessfully");

RadAjaxManager1.ResponseScripts.Add("btnBankingAlertDoneClick()");

 

When debugging i can see ths code is hit but the alert and the function are not called.

Please help!!

Darren Nicholl
Top achievements
Rank 1
 answered on 08 Jul 2011
2 answers
54 views
I want to have my entire screen use the ajaxloadingpanel.  I have some code here:

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlInner" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnReset">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlInner"  LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
  
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
        IsSticky="true" Style="position:absolute; top:0; left:0; height:100%; width:100%;">
    </telerik:RadAjaxLoadingPanel>

 

 

which works for texboxes, etc.  but not for a radgrid.  The grid is blank.  But, I tried wrapping the grid with the radajaxloadingpanel and then the grid gets updated fine, but NOT the text boxes.  I can't seem to make it all work together on one screen.  And, the example for wrapping the entire screen in the ajaxloadingpanel is 2 1/2 years old and so it doesn't apply here.

Maria Ilieva
Telerik team
 answered on 08 Jul 2011
6 answers
183 views
I have RadGrid2 in RadGrid1's EditForm FormTemplate.  I have RadGrid2 being binded with the ItemCreated of RadGrid1 using advanced databinding.  I know that if you put the RadGrid2 within the NeedDataSource it will rebind automatically but I cannot access the ID of RadGrid2 in the RadGrid2_NeedDataSource in able to bind the data the first time.  So I use the GridEditFormItem FindControl to get the ID of RadGrid2 but cannot do that outside the RadGrid1_ItemCommand.

Any suggestions?
Genti
Telerik team
 answered on 08 Jul 2011
3 answers
101 views
Hi I have a radlistbox inside of a panel that has a collapsable panel extender added to it and when the panel is minimized the radlistbox sits on top of it and does not hide. THis only happens in IE8 and older versions. Please tell me how I can overcome this.
Peter Filipov
Telerik team
 answered on 08 Jul 2011
1 answer
110 views
I have noticed on the "Grid / Binary Images and Upload in Grid",    if you refresh the PAGE after inserting a new image/record, another duplicate new row is added. This behaviour also happens on the demo page.
Is there a way to prevent this happening?
Peter Filipov
Telerik team
 answered on 08 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?