Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
118 views
Hi

Im trying to use telerik redchedule , I use web service to populate data, it working well on my local . but when I deployed it to server it rise an error 
"

No connection could be made because the target machine actively refused it 119.252.77.166:80

"

any  suggestion, what should I do hendle this error?
Bozhidar
Telerik team
 answered on 28 Apr 2015
7 answers
535 views
I am using RadEditor For ASP.Net AJAX

I want to give PageBreaks and Header, Footer Informations on each page.
Is any feature provided by RadEditor?? or how can I implement these features??

Regards,
Ramesh R.
Bharani
Top achievements
Rank 1
 answered on 28 Apr 2015
5 answers
60 views

Hello,

I have designed a webpage, where I have used RadRibbon (RadRibbon has RadTooptip as well).

When a user clicks on a specific Ribbon Tab (EmpTab), a Silverlight application is opened.

The RadTooltip hides under the Silverlight application (please enclosed the snapshot).

Can u please suggest a solution or a possible workaround to overlay the Radtooltip on the SilveSrlight.

Its an urgent issue, prompt answer is appreciated.

Thanks

~P

Alok
Top achievements
Rank 2
 answered on 28 Apr 2015
1 answer
116 views

I am deciding whether to use the Telerik controls for a project. The problem I've got is fairly straightforward and I've tried to create an ultra simple test code to see if it works and it doesn't.

I have a page with various forms of user input. I want a panel that displays a list of dynamically loaded user controls based on the user input.

For my test page I have simply created 3 user controls: control_a, control_b and control_c

On the main page I have a text input box and a "submit" button. I also have a xmlhttppanel and that simply has a placeholder in it The submit_click event simply reads .text property of the text box and does:

foreach (char c in txt_input.Text) {
            if ("abc".Contains(c))
    {
s = (UserControl)Page.LoadControl(string.Format("~/test/control_{0}.ascx", c));
s.ID = string.Format("asynccontrol_{0}", i++);
ph_panel.Controls.Add(s);
} } 

This works. It dynamically loads a set of user controls based on the user input.

However, in control_a I have a label, a text box and a "save" button. The save_click event simply copies the text box text to the label.text

Without using the rad control xmlhttppanel I was having a problem with a standard .net form that the dynamically loaded user controls weren't persisting. The rad xmlhttppanel appears to solve this (fab). However, the save_click event isn't executing. What have I missed?

Do I need to do anything else to make this app run safely and robustly?

Slav
Telerik team
 answered on 28 Apr 2015
4 answers
61 views

Sorry to sound impatient (I may yet have to open a support ticket) but I've been testing my application and I've run into a last minute IE11 compatibility problem.

 I have a RadGrid that uses RadButtons as link buttons to download attached files from a database.  This general set up has been in production for years now and has generally worked perfectly, in Chrome and Firefox.  Unfortunately we've had a number of problems with IE and we had believed we had solved most of them by moving to a new server and this generally seems to be true, with one exception.

I cannot download files in IE.  I get an error message saying file cannot be downloaded.  If I retry it claims to have succeeded but what I get is a corrupted stub of a file.  

The download process itself runs through the RadGrid's ItemCommand event handler and is so far as I know fairly conventional.  I get the file as a string from the database, set the Current.Response.ContentType to whatever the file is (In this case "image/jepg"), then do an add header ( AddHeader("Content-Disposition", "attachment; filename=\"" + sAttachName + "\"") ) and finally a BinaryWrite of the byte array containing the file.   As I said, this works perfectly in Chrome and Firefox.

It occurs to me that I've already had a problem like this earlier (http://www.telerik.com/forums/failure-of-download-links-after-ajaxifying-radgrid) and the code mentioned in that entry has not been changed in any way.

Suggestions?

Konstantin Dikov
Telerik team
 answered on 28 Apr 2015
1 answer
105 views

 <telerik:RadAsyncUpload runat="server" DisablePlugins="true" EnableInlineProgress="false" ID="AsyncUpload1" OnClientFileUploaded="OnClientFilesUploaded"
                                UploadedFilesRendering="BelowFileInput" MultipleFileSelection="Automatic" />

  <telerik:RadButton ID="btnUploadFiles" OnClientClicking="OnClientClicking" runat="server" Text="Upload File" />

 <script>
        function OnClientClicking(sender) {
            sender.set_autoPostBack(false);
            $telerik.$(".ruFileInput").click();
        }</script>

 

when DisablePlugins="true" of RadAsyncUpload, we can not select multiple files on IE

and if we remove DisablePlugins="true" of RadAsyncUpload, $telerik.$(".ruFileInput").click(); event not working...

 

 

 

 

Hristo Valyavicharski
Telerik team
 answered on 28 Apr 2015
4 answers
335 views
Is there a method for the client side so that I can access the control within the itemtemplate in lightbox item?  I have asp label (or I can use radtextbox) inside of the lightbox itemtemplate and need to change value.

Thank you!

Angel Petrov
Telerik team
 answered on 28 Apr 2015
1 answer
49 views

We have a page which has a div at the top with some links and a Telerik Calendar control.  Below we have a large grid of divs in a layout mimicking a spreadsheet. 

When the page loads for the first time everything works fine.  Then when you click on the "More" button, the js makes a remote scripting call back to the server to get more rows for our scrolling spreadsheet.  The page returns and fills the divs associated with the "spreadsheet" with the updated data.  The problem is that now when the user mouses over the calendar, the whole div that contains the calendar jumps down 3 lines or so.  When debugging the page, I've noticed that the call that seems to be throwing off the alignment is the call to the following code.

Is there any way stop the code I've pasted below from firing when mousing over the calendar control or else to stop this code from disrupting the layout of the divs on an update the the divs in the DOM?

Sys.UI.DomEvent = function Sys$UI$DomEvent(eventObject) {
    /// <summary locid="M:J#Sys.UI.DomEvent.#ctor" />
    /// <param name="eventObject"></param>
    /// <field name="altKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.altKey"></field>
    /// <field name="button" type="Sys.UI.MouseButton" locid="F:J#Sys.UI.DomEvent.button"></field>
    /// <field name="charCode" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.charCode"></field>
    /// <field name="clientX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.clientX"></field>
    /// <field name="clientY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.clientY"></field>
    /// <field name="ctrlKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.ctrlKey"></field>
    /// <field name="keyCode" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.keyCode"></field>
    /// <field name="offsetX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.offsetX"></field>
    /// <field name="offsetY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.offsetY"></field>
    /// <field name="screenX" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.screenX"></field>
    /// <field name="screenY" type="Number" integer="true" locid="F:J#Sys.UI.DomEvent.screenY"></field>
    /// <field name="shiftKey" type="Boolean" locid="F:J#Sys.UI.DomEvent.shiftKey"></field>
    /// <field name="target" locid="F:J#Sys.UI.DomEvent.target"></field>
    /// <field name="type" type="String" locid="F:J#Sys.UI.DomEvent.type"></field>
    var e = Function._validateParams(arguments, [
        {name: "eventObject"}
    ]);
    if (e) throw e;
    var ev = eventObject;
    var etype = this.type = ev.type.toLowerCase();
    this.rawEvent = ev;
    this.altKey = ev.altKey;
    if (typeof(ev.button) !== 'undefined') {
        this.button = (typeof(ev.which) !== 'undefined') ? ev.button :
            (ev.button === 4) ? Sys.UI.MouseButton.middleButton :
            (ev.button === 2) ? Sys.UI.MouseButton.rightButton :
            Sys.UI.MouseButton.leftButton;
    }
    if (etype === 'keypress') {
        this.charCode = ev.charCode || ev.keyCode;
    }
    else if (ev.keyCode && (ev.keyCode === 46)) {
        this.keyCode = 127;
    }
    else {
        this.keyCode = ev.keyCode;
    }
    this.clientX = ev.clientX;
    this.clientY = ev.clientY;
    this.ctrlKey = ev.ctrlKey;
    this.target = ev.target ? ev.target : ev.srcElement;
    if (!etype.startsWith('key')) {
        if ((typeof(ev.offsetX) !== 'undefined') && (typeof(ev.offsetY) !== 'undefined')) {
            this.offsetX = ev.offsetX;
            this.offsetY = ev.offsetY;
        }
        else if (this.target && (this.target.nodeType !== 3) && (typeof(ev.clientX) === 'number')) {
            var loc = Sys.UI.DomElement.getLocation(this.target);
            var w = Sys.UI.DomElement._getWindow(this.target);
            this.offsetX = (w.pageXOffset || 0) + ev.clientX - loc.x;
            this.offsetY = (w.pageYOffset || 0) + ev.clientY - loc.y;
        }
    }
    this.screenX = ev.screenX;
    this.screenY = ev.screenY;
    this.shiftKey = ev.shiftKey;
}

 

 

 

I've been wrestling with this for several day now, so any thoughts or ideas are much appreciated!

Daniel

Konstantin Dikov
Telerik team
 answered on 28 Apr 2015
4 answers
1.8K+ views
Scenario: Users want to be able to specify a comma delimited-set of values to search for.

Solution: Convert "EqualsTo" query with a comma to a "IN { 'a','b','c' }" list style query. Bit hackish.

I'm using the sample in the Forum post as the base (it allows me to have a pre-specified/default filter and then add to it): http://www.telerik.com/forums/grid-filter-and-the-entitydatasource-control-whereparameters

Use a standard (or in my case Calculated) column, but with the field defined, with standard "EqualsTo" field defined:

<telerik:GridTemplateColumn DataField="CustomerTypeCode" UniqueName="CustomerType" HeaderText="Customer Type" SortExpression="CustomerTypeCode" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterControlWidth="130px">
                    <HeaderStyle Width="150px" />
                    <ItemStyle Width="150px" />
                    <ItemTemplate>
                        <%# string.Format("{0} - {1}", Eval("CustomerTypeCode"), Eval("CustomerTypeDescription")) %>
                    </ItemTemplate>                   
                </telerik:GridTemplateColumn>

You "Selecting" event on the Entity Data Source is handled as per above sample:

protected void edsCustomers_Selecting(object sender, EntityDataSourceSelectingEventArgs e)
        {
            // Get the filtered data source (if applicable) and then append/pre-pend default filter
            EntityDataSource dataSource = e.DataSource;
            AddParameters(dataSource);
            BuildWhere(dataSource);
        }

Here's the crazy hack to rewrite the EqualsTo / Contains (LIKE) to a "IN" clause style query:

private void BuildWhere(IDynamicDataSource dataSource)
        {
            string filter = FilterDefault;
 
            // Parse filters with commas - convert LIKE and Equals (=) queries to IN query
            string gridFilters = dataSource.Where;
            if (!string.IsNullOrEmpty(gridFilters))
            {
                if (gridFilters.Contains(","))
                {
                    // Find filter fields (either Equals = or LIKE) with data inside quotes and rewrite to an "IN" query
                    // Looks for it.[Field] = "a,b" (or it.[Field] LIKE "%a,b%") etc                    
                    Regex regexCommaValues = new Regex("it\\.\\w*.....\\s([\"'])(?:(?=(\\\\?))\\2.)*?\\1");
                    var matches = regexCommaValues.Matches(gridFilters);
                    foreach (Match match in matches)
                    {
                        string value = match.Value;
                        value = value.Replace("LIKE \"", "IN {'");
                        value= value.Replace("%", "");
                        value = value.Replace("= \"", "IN {'");
                        value= value.Replace(",", "','");
                        value= value.Replace("\"", "'}");
 
                        // Replace original match with modified string
                        gridFilters = gridFilters.Replace(match.Value, value);
                    }
                }
 
                filter += " AND " + gridFilters;
            }
 
            // If custom filtering enabled, pre-pend with our default parameter
            dataSource.Where = filter;           
        }

Enjoy the hack. 

Please - if you can improve the solution or the regex, let me know!
Viktor Tachev
Telerik team
 answered on 28 Apr 2015
5 answers
290 views
Hello,

I created a web application, in which using control RadNumericTextBox. The code snippet is like below.
<telerik:RadNumericTextBox ID="MaxChildAge" runat="server" Type="Number" ShowSpinButtons="True"
            ButtonsPosition="Right" IncrementSettings-InterceptArrowKeys="True"
            IncrementSettings-Step="1" MaxValue="21" MinValue="0" MaxLength="2" NumberFormat-DecimalDigits="0">
            <EnabledStyle HorizontalAlign="Right" />
        </telerik:RadNumericTextBox>

However, when I browse this page thru IE/chrome, the spin buttons are not visible but it can work if I click mouse on the spin button area.

Thanks!
Maria Ilieva
Telerik team
 answered on 28 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?