Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views

I load a pop-up window fromone of my pages and based on certain action in the pop-up I need to close the pop-up and refresh data on the parent page.
I used the functionality as shown in the demo - http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

I was able to send back arguments to the parent page and the ajaxrequest is initiated. But as soon the page is posted back my pop-up window shows up again. If I comment the code to initiate the ajaxrequest everything looks ok.

Below is the code I am using:

On Parent Page:
  
function OnClientClose(args) {
                var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
                var arg = args.argument
                if (arg) {
                    ajaxManager.ajaxRequest("Refresh");
                }
                else {
                }
            }
  
Window declaration on parent page:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" 
        Behavior="None"  ShowContentDuringLoad="false" Width="900px">
        <Windows>
            <telerik:RadWindow ID="RadWindowSelectPolicyRole" runat="server"  DestroyOnClose="false" Title="Activity" OnClientClose="OnClientClose"
                 Behavior="None" ReloadOnShow="true" ShowContentDuringLoad="false"
                Width="975px" Height="545px" Modal="true" />
        </Windows>
    </telerik:RadWindowManager>
  
code-behind:
Protected Sub manager_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
        If e.Argument = "Refresh" Then
            PopulateAdditionalContacts()
        End If
    End Sub
  
on my dialog page I close the window like this:
function CloseWindowOnSuccess() {
            var oWnd = GetRadWindow();
            if (oWnd != null) {
                oWnd.argument = "Refresh";
                oWnd.close();
            }
        }

I am unable to understand why the pop-up window is loaded once the ajax request is initiated?
Svetlina Anati
Telerik team
 answered on 24 Dec 2010
1 answer
61 views
Hi,

I got error when i try to retrieve data from excel file in using ajax setting update control. When I do not use ajax setting update control, I can retrieve data from excel.

Please kindly suggest me any config i need to change or RadAjax is not supporting data retrieving from excel ?

my codes are as follow.

 
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            onajaxrequest="RadAjaxManager1_AjaxRequest" clientevents-onrequeststart="startProgress" clientevents-onresponsereceived="hideProgress">
            <clientevents onrequeststart="startProgress" />
                     <AjaxSettings>
                                                                 
                       <telerik:AjaxSetting AjaxControlID="btnUpload">
                  
                            <UpdatedControls>
                                
                                           <telerik:AjaxUpdatedControl ControlID="grvServiceList" LoadingPanelID="RadAjaxLoadingPanel1" />
                           
                            </UpdatedControls>
                  
                        </telerik:AjaxSetting>
                        
                    </AjaxSettings>
               </telerik:RadAjaxManager>  

using (OleDbConnection connExcel = new OleDbConnection(strExlConn))
            {              

                OleDbCommand cmdExcel = new OleDbCommand();
                OleDbDataAdapter da = new OleDbDataAdapter();
                cmdExcel.Connection = connExcel;

                connExcel.Open();
                DataTable dtExcelSchema;
                dtExcelSchema = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
                connExcel.Close();

                //string sheetName = dtExcelSchema.Rows[0]["TABLE_NAME"].ToString(); //dtExcelSchema.Rows[0]["TABLE_NAME"];

                string sheetName = string.Empty;

                for (int i = 0; i < dtExcelSchema.Rows.Count; i++)
                {
                    sheetName = sheetName + ", " + dtExcelSchema.Rows[i]["TABLE_NAME"].ToString();
                }

                DataSet ds = new DataSet();

                string SheetName = "Sheet1$";//dtExcelSchema.Rows[0]["TABLE_NAME"].ToString();

                cmdExcel.CommandText = "SELECT '" + JobId + "' AS [JobId], * From [" + SheetName + "]";

                da.SelectCommand = cmdExcel;               

                da.Fill(ds);


                if (cmdExcel != null) cmdExcel.Dispose();
                if (da != null) da.Dispose();
                if (connExcel != null) connExcel.Dispose();               

                //ds.Clear();
                //ds.Dispose();

                return ds.Tables[0];
            }
Daniel
Telerik team
 answered on 24 Dec 2010
1 answer
101 views
Hello, everyone. I would like to take take text from a RadEditor control and add it to a PDF document that I am generating using 3rd party libraries.
So far the only ways I have thought to do this are either to superimpose a PDF generated from the RadEditor on a PDF I am creating ... or somehow write a manual PDF parser to take the raw PDF from RadEditor and inject it into the new one.
Neither of these options are desirable.

Can someone please tell me, is there any other way to do what I'm trying to accomplish?
Thanks!
Stanimir
Telerik team
 answered on 24 Dec 2010
1 answer
129 views
Hi,

I am using radnumeric text box in currency formate. How can configure textbox to appear the negative value as shown in screen shot.
RadNumericTextBox txtCostBasis = dataItem.FindControl("txtCostBasis") as RadNumericTextBox;
                       txtCostBasis.Type = NumericType.Currency;
                       txtCostBasis.NumberFormat.DecimalDigits = 2;
                       txtCostBasis.NumberFormat.DecimalSeparator = ".";
                       txtCostBasis.NumberFormat.GroupSeparator = ",";
                       txtCostBasis.NumberFormat.GroupSizes = 3;
                       txtCostBasis.NumberFormat.NegativePattern = "$ -n";
                       txtCostBasis.NumberFormat.PositivePattern = "$ n";
                       txtCostBasis.Culture = new CultureInfo("en-US");
Daniel
Telerik team
 answered on 24 Dec 2010
2 answers
131 views
Are rad controls FIPS compatible ?
Pavaman
Top achievements
Rank 1
 answered on 24 Dec 2010
2 answers
98 views
I got this JS error when I put ColorPicker inside another AJAX control:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; HPNTDF; .NET4.0C; .NET4.0E)
Timestamp: Wed, 22 Dec 2010 14:14:10 UTC

Message: Invalid argument.
Line: 4146
Char: 24
Code: 0
URI: http://localhost:53359/wisdom/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.3.1215.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a8c7a5421-4dd4-41ca-a3e5-203852b3dd8e%3a16e4e7cd%3a874f8ea2%3af7645509%3a24ee1bba%3af46195d3%3a19620875%3a490a9d4e%3abd8f85e4%3aa44b89c4%3a1e771326%3af9b9258%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3a923aa3cc%3a853c2e0b%3a46f97eb1%3a782b16ab%3a535785ef%3af48dface%3a50114f04%3a29340eb0%3a8a480787

 


The ColorPicker works fine outside the AJAX control, here is an sample which gives this error:

<

 

 

asp:TextBox ID="DateTextBox" runat="server" Width="80" autocomplete="off" /><br /><br />

 

 

 

<asp:Panel ID="Panel1" runat="server" CssClass="popupControl">

 

 

 

<table style="width:310px;">

 

 

 

<tr>

 

 

 

<td style="white-space:nowrap;width:200px;vertical-align:top;">

 

Header Colour:

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadColorPicker runat="server" ID="RadColorHeader" PaletteModes="All"

 

 

 

SelectedColor="98, 108, 137">

 

 

 

</telerik:RadColorPicker>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

 

</asp:Panel>

 

 

 

<ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server"

 

 

 

TargetControlID="DateTextBox"

 

 

 

PopupControlID="Panel1"

 

 

 

Position="Right" />

 

 

Mazdak
Top achievements
Rank 1
 answered on 24 Dec 2010
3 answers
130 views
The following code demonstrates the problem:

On the ASPX page:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestForm.aspx.cs" Inherits="TestForm" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ScriptManager runat="server" ID="sm" />
    <telerik:RadAjaxManager runat="server" ID="ram">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="chkBox">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlAjaxHandle" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <asp:CheckBox runat="server" ID="chkBox" Text="Show" AutoPostBack="true" />
 
    <asp:Panel runat="server" ID="pnlAjaxHandle">
        <telerik:RadAsyncUpload runat="server" ID="upload" />
    </asp:Panel>
 
    <asp:Button runat="server" ID="button" Text="Submit" />
    </div>
    </form>
</body>
</html>

In the code behind:
public partial class TestForm : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        upload.Visible = chkBox.Checked;
    }
}


To replicate the bug:

1) Check the checkbox - Uploader becomes visible
2) Uncheck the checkbox - Uploader is hidden
3) Click Submit button
4) Check the checkbox - Uploader becomes visible and has lost its skin

Also, a whole lot of javascript errors are thrown. They look something like this:
Error: Sys.ArgumentOutOfRangeException: Value must be an integer.
Parameter name: y
Actual value was 54.5.
Source File: http://localhost:3283/ScriptResource.axd?d=8jczEaLTFUBNqwheNCryHqfGUyK2jzpjLXo5mShpcz0vUHsdNGX-REGSwtvamEPDvjtp5sE7pj8aTVKzLe84Q85zDxCG4QATzYj_HpM0Cnan9nZUFERr90xkeQfhl5f6aXCNKC5ZmIzMAPOOyOmuWJBKQo-2AyNSw9-R7L0L6qZXIrJo0&t=2610f696
Line: 4488


Using Telerik version 2010.1.519.35.
Genady Sergeev
Telerik team
 answered on 24 Dec 2010
3 answers
179 views
Where can i find the Installation Instruction for ASP.NET RadEditor for MOSS Lite Edition? The help file included on the zip file is broken.

The installation instruction on http://www.telerik.com/help/aspnet-ajax/moss-introduction.html is for "RadControls for ASP.NET AJAX".

Is the installation for "ASP.NET RadEditor for MOSS Lite Edition" the same as "RadControls for ASP.NET AJAX"?

Thank you.
Stanimir
Telerik team
 answered on 24 Dec 2010
1 answer
164 views
I have a button placed on a pretty large page with a lot of controls and the icon/image does not render until I mouse over it.  Here is the way the control is coded on the page:
<telerik:RadButton ID="RadButton1" runat="server" Text="Apply" Skin="Windows7" Width="150px" CssClass="ie7buttondist">
    <Icon PrimaryIconUrl="~/Images/Apply14.gif" 
        PrimaryIconWidth="14px" PrimaryIconHeight="14px" PrimaryIconLeft="20px" 
        PrimaryPressedIconUrl="~/Images/Apply14.gif" 
        PrimaryHoveredIconUrl="~/Images/Apply14.gif" />
</telerik:RadButton>

I already know what you are going to say, "we could not recreate the problem on our end"  I'm aware that this works if you place it on a form by it self.  I can get it to work on simple form.  The problem lies when this is placed on a form with a lot of other control.  Is there a way to force a refresh on the button?  Is there a style I should be setting?  Should I not bother to set the URLs in the HTML and do it in the VB code behind?
Pero
Telerik team
 answered on 24 Dec 2010
1 answer
140 views
can some give sample code for Grid with model popup extender in hyper link,
and also select multiple records by using check box and pop up the values
Princy
Top achievements
Rank 2
 answered on 24 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?