Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
62 views
Hi,

           <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Skin="Black" 
                TargetFolder="~/Uploads" TemporaryFolder="~/Uploads/TempFiles" DropZones=".DropZone1" 
                MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput" 
                Width="300px" onclientfileuploaded="setGaugeValue();"></telerik:RadAsyncUpload>

                <script type="text/javascript">
                    function setGaugeValue() {
                        $find("<%=UploadedFileGauge.ClientID %>").set_value($get("<%=UploadedFileGaugeHiddenValue.ClientID %>").value);
                    }
            </script>

...I'm trying to update the gauge value on the client side, each time a file is uploaded (won't work using the RadAsyncUpload1.FileUploaded event handler on the server-side). But...if I put in a call to some client-side JavaScript the gauge hides on my web page.

Please advise,

Bazz

Shinu
Top achievements
Rank 2
 answered on 14 Jan 2014
5 answers
266 views
In our project we are using a splitter and inside it we are having a RadGrid on half of the part and a RadSchedular on the other half, depending on the requirement, functionality has to be something like that on Scroll  of Schedular the contents of the Grid should get scrolled in parallel.
Now the following <ClientSettings >has been added for the Grid -

<Scrolling AllowScroll="true" UseStaticHeaders="true" />


and on OnScroll ClientEvent the following javascript is called which is responsible for calculating the Scroll Position and binding it together
<ClientEvents OnScroll="ScrollGrid" OnColumnResized="ColumnResized" OnColumnShown="ColumnShown" />


Script : 

var isInGridScrolling = false;
function ScrollGrid(sender, args) {
var scrollTop = args.get_scrollTop();
isInGridScrolling = true;
$telerik.getElementByClassName(document.body, "rsContentScrollArea").scrollTop = scrollTop;
 isInGridScrolling = false;
}

Additionaly on Page load the following script is getting called -
  
function contentPageLoad() {
       $addHandler($telerik.getElementByClassName(document.body, "rsContentScrollArea"), "scroll", function (e) {
         if (!isInGridScrolling) {
             var RadGrid1 = $find("<%= SPGrid.ClientID %>");
             RadGrid1.GridDataDiv.scrollTop = e.target.scrollTop;
         }
     });


In the Schedular we are just including the tag OverflowBehavior="Scroll" , Now the Grid contents are succesfully getting scrolled with the Schedular scrollbar, but the mousewheel scroll is only working when the cursor is above the Schedular, how can the mousewheel scroll work for Grid as well ?

It will be very grateful if anyone can provide me help on the topic, feel free to contact me in case of any clarity is required
 
Venelin
Telerik team
 answered on 14 Jan 2014
1 answer
47 views
Hi,

In-line progress doesn't work on IE8.
DisablePlugins option is set to "true".
Everything fine on IE10/Firefox/Chrome.

Any workarounds?
Do you support this browser version?

Regards,
Dennis
Shinu
Top achievements
Rank 2
 answered on 14 Jan 2014
2 answers
50 views
We have recently updated all of our poups to RadWindows. We have a JavaScript file that parses phone number as they are entered and adds the dashes, etc. This worked fine in the ModalPopupExtender we were using and it still works fine on the pages that are not RadWindows. It also works fine on the RadWindow in IE and Chrome, but not in FireFox. I cannot for the life of me figure out why it does not work on the RadWindows only in FireFox. Any Ideas?

Here is the JS code:
var zChar = new Array(' ', '(', ')', '-', '.');
var maxphonelength = 12;
var phonevalue1;
var phonevalue2;
var cursorposition;
 
function ParseForNumber1(object) {
    phonevalue1 = ParseChar(object.value, zChar);
}
function ParseForNumber2(object) {
    phonevalue2 = ParseChar(object.value, zChar);
}
 
function backspacerUP(object, e) {
    if (e) {
        e = e
    }
    else {
        e = window.event
    }
    if (e.which) {
        var keycode = e.which
    }
    else {
        var keycode = e.keyCode
    }
 
    ParseForNumber1(object)
 
    if (keycode >= 48) {
        ValidatePhone(object)
    }
}
 
function backspacerDOWN(object, e) {
    if (e) {
        e = e
    }
    else {
        e = window.event
    }
    if (e.which) {
        var keycode = e.which
    }
    else {
        var keycode = e.keyCode
    }
    ParseForNumber2(object)
}
 
function GetCursorPosition() {
 
    var t1 = phonevalue1;
    var t2 = phonevalue2;
    var bool = false
    for (i = 0; i < t1.length; i++) {
        if (t1.substring(i, 1) != t2.substring(i, 1)) {
            if (!bool) {
                cursorposition = i
                bool = true
            }
        }
    }
}
 
function ValidatePhone(object) {
 
    var p = phonevalue1
 
    p = p.replace(/[^\d]*/gi, "")
 
    if (p.length < 3) {
        object.value = p
    }
    else if (p.length == 3) {
        pp = p;
        d5 = p.indexOf('-')
        if (d5 == -1) {
            pp = pp + "-";
        }
        object.value = pp;
    }
    else if (p.length > 3 && p.length < 6) {
        l30 = p.length;
        p30 = p.substring(0, 3);
        p30 = p30 + "-"
        p31 = p.substring(3, l30);
        pp = p30 + p31;
        object.value = pp;
    }
    else if (p.length >= 6) {
        l30 = p.length;
        p30 = p.substring(0, 3);
        p30 = p30 + "-"
        p31 = p.substring(3, l30);
        pp = p30 + p31;
        l40 = pp.length;
        p40 = pp.substring(0, 7);
        p40 = p40 + "-"
        p41 = pp.substring(7, l40);
        ppp = p40 + p41;
        object.value = ppp.substring(0, maxphonelength);
    }
 
    GetCursorPosition()
 
    if (cursorposition >= 0) {
        if (cursorposition == 0) {
            cursorposition = 2
        } else if (cursorposition <= 2) {
            cursorposition = cursorposition + 1
        } else if (cursorposition <= 5) {
            cursorposition = cursorposition + 2
        } else if (cursorposition == 6) {
            cursorposition = cursorposition + 2
        } else if (cursorposition == 7) {
            cursorposition = cursorposition + 4
            e1 = object.value.indexOf(')')
            e2 = object.value.indexOf('-')
            if (e1 > -1 && e2 > -1) {
                if (e2 - e1 == 4) {
                    cursorposition = cursorposition - 1
                }
            }
        } else if (cursorposition < 11) {
            cursorposition = cursorposition + 3
        } else if (cursorposition == 11) {
            cursorposition = cursorposition + 1
        } else if (cursorposition >= 12) {
            cursorposition = cursorposition
        }
 
        var txtRange = object.createTextRange();
        txtRange.moveStart("character", cursorposition);
        txtRange.moveEnd("character", cursorposition - object.value.length);
        txtRange.select();
    }
 
}
 
function ParseChar(sStr, sChar) {
    if (sChar.length == null) {
        zChar = new Array(sChar);
    }
    else zChar = sChar;
 
    for (i = 0; i < zChar.length; i++) {
        sNewStr = "";
 
        var iStart = 0;
        var iEnd = sStr.indexOf(sChar[i]);
 
        while (iEnd != -1) {
            sNewStr += sStr.substring(iStart, iEnd);
            iStart = iEnd + 1;
            iEnd = sStr.indexOf(sChar[i], iStart);
        }
        sNewStr += sStr.substring(sStr.lastIndexOf(sChar[i]) + 1, sStr.length);
 
        sStr = sNewStr;
    }
 
    return sNewStr;
}
DogBizPro
Top achievements
Rank 1
 answered on 13 Jan 2014
0 answers
98 views

I have a textbox that is bound to an Employer class - Address class - PostalZipCode field such as this:



#
Bind("Employer.Address.PostalZipCode")



It loads the data in a formview correctly.  However when I edit a value and get into the View_Updating method, my e.DataItem doesn't reflect any changes I've made.



What's the correct way to go about this?


Stacy
Top achievements
Rank 1
 asked on 13 Jan 2014
3 answers
76 views
i am using this example
http://demos.telerik.com/aspnet-ajax/rotator/examples/net35datasources/defaultcs.aspx

below is my code

  <fieldset class="fieldsetClass">
               <legend>EntityDataSource</legend>
               <telerik:RadRotator runat="server" ID="RadRotator2" DataSourceID="SqlDataSource1"
                    ScrollDirection="Left" Width="600px" ItemWidth="300px" Height="120px" ItemHeight="120px">
                    <ItemTemplate>
                         <div class="itemTemplateWithButtons">
                              <asp:Image ID="CustomerImage" runat="server" AlternateText="Customer image" ImageUrl='<%#"~/ImageHandlers/ProjectImageHandler.ashx?id="+ Eval("project_id") %>'
                                   CssClass="customerImage"></asp:Image>
                              <div class="customerProp">
                                   <div class="customerName">
                                        <asp:Label ID="CustomerName" runat="server"><%# DataBinder.Eval(Container.DataItem, "project_name")%></asp:Label>
                                   </div>
                                   <div class="customerCity">
                                        <asp:Label ID="CustomerCity" runat="server"><%# DataBinder.Eval(Container.DataItem, "project_type")%></asp:Label>
                                   </div>
                                   <div class="customerCountry">
                                        <asp:Label ID="CustomerCountry" runat="server"><%# DataBinder.Eval(Container.DataItem, "current_state")%></asp:Label>
                                   </div>
                              </div>
                         </div>
                    </ItemTemplate>
               </telerik:RadRotator>
          </fieldset>

 <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
              ConnectionString="Data Source=192.168.0.63;Initial Catalog=RealEstateDomain;Persist Security Info=True;User ID=sa;Password=techfreedom@123" 
              ProviderName="System.Data.SqlClient" 
              SelectCommand="SELECT * FROM [ProjectMaster]"></asp:SqlDataSource>
          
I am getting all the data from database but not getting images.....image area s blank...
please help me what can i do...i also dont have radbinaryimage control in my telerik controls
Marin Bratanov
Telerik team
 answered on 13 Jan 2014
1 answer
300 views

We have a project in production where we implemented a simple RadWindow and allow the iframe content to be printed. 

This has worked fine for years, but since IE11 the print functionality has stopped working.  I tried upgrading to the latest Telerik suite but it did not fix the issue.

Here is the snippet I am using to accomplish the printing which is almost a literal copy from the Telerik examples (which works in every IE prior to 11, Chrome, and Firefox for us)

<script type="text/javascript">
 
    function PrintIframeContent() {
        var oWindow = GetRadWindow();
        var content = oWindow.GetContentFrame().contentWindow;
        var printDocument = content.document;
 
        if (document.all) {
            printDocument.execCommand("Print");
        } else {
            content.print();
        }
    }
 
    function GetRadWindow() {
        var oWindow = null;
 
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
 
        return oWindow;
    }
 
    function CloseWin() {
        //Get the RadWindow 
        var oWindow = GetRadWindow();
 
        //Call its Close() method 
        oWindow.Close();
    
</script>

I can see the code is getting executed when debugging but it does not fire an actual print command in the browser (to show the print dialogue).  

If I force my IE11 browser into IE10 Document Mode then everything works as expected. 

For some reason the content.print()  seems to do nothing now under Edge mode.  Oddly enough if I use the other function from the JavaScript printDocument.execCommand("Print") then everything works fine in IE11 Edge mode.  

Can someone explain what is going on here as this has been in production and working for years until this, and I had to implement this change not knowing why this is now happening.

Also a side note, I had to force my IE11 browser into IE10 Document Mode emulation on this page also to even get the RadEditor menu items to show so I could use/see the 'Format Code Block' option.

Thank you please advise

Marin Bratanov
Telerik team
 answered on 13 Jan 2014
4 answers
114 views
Hi All,

I've implemented a standard RadComboBox as in this example:
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/autocompleteclientside/defaultcs.aspx

However, it does not appear to be capable of finding substring data, only what things start with.  IE: It can find "John Smith" if I start typing "jo" but if I type "sm" it will not find it.  Can you please advise?

Thanks,
Mark
Mark
Top achievements
Rank 1
 answered on 13 Jan 2014
2 answers
100 views
Hi -

I'm running Visual Studios 2008 on XP.  We originally started out with RadControls for AJAX Q3 2009 version number: 2009.3.1103.35

I upgraded to a newer version a few months ago and got an error, but at the time it wasn't neccesary to upgrade, so I let it go.  Now I need to upgrade and am getting the same error and am wanting it resolved.

Error 3 Unable to copy file "..\..\..\..\..\..\..\Program Files\Telerik\RadControls for ASP.NET AJAX Q2 2010\Bin35\Telerik.Web.UI.xml" to "bin\Telerik.Web.UI.xml". Access to the path 'bin\Telerik.Web.UI.xml' is denied.

I checked the security of the xml file and I have all rights.

Any help with this error would be greatly appreciated.

Also...
Do I need to remove all other copies of Telerik from Add/Remove Programs to get the current most up-to-date version to work?
What if you have different projects with different Telerik Control versions?  Can you run them?

Thanks!
wen
David
Top achievements
Rank 1
 answered on 13 Jan 2014
1 answer
269 views
  1. Is it possible when hovering over a line series for a small marker or indicator to appear on the line at the hover point?  (Something similar to the little dot at https://www.google.com/finance?q=NASDAQ:AAPL
  2. If I want to format a tooltip using ClientTemplate, do I have to be using KendoUI per this article?  I want to display both the XAxis and YAxis values in the tooltip.  The XAxis value comes from a DateTime column in my datasource, and the YAxis is a decimal that I want to display in #,# format (with thousands separator and no decimal places).  When I set it in the ClientTemplate, I'm unable to format it.  I'm not using KendoUI.  Is there any other option?  Can I do it server-side?
Danail Vasilev
Telerik team
 answered on 13 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?