Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
66 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
66 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
109 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
100 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
326 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
143 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
130 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
308 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
1 answer
327 views
Hi Team,
    I am trying to add check boxes in group header dynamically,i found some code  http://www.telerik.com/community/forums/aspnet-ajax/ajax/groupging-columns-with-check-boxes.aspx in this link when i try with it i am unable to click the check boxes in header (disable mode) can you please help me.

Team, 
   Please find the attached screen shot of my requirement.high lighted area should get check boxes.

Using in aspx 

<telerik:RadGrid ID="gvSRSecurity" AutoGenerateColumns="false" runat="server" CellSpacing="0" ShowGroupPanel="true"  OnItemCreated="RadGrid1_ItemCreated"
          OnItemDataBound="RadGrid1_ItemDataBound"  AllowMultiRowSelection="True"
                            GridLines="None" Width="100%" PagerStyle-AlwaysVisible="true">
                            <ClientSettings>
                                <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
                            </ClientSettings>
                            <MasterTableView AutoGenerateColumns="False" TableLayout="fixed" DataKeyNames="ReportId"
                                GroupsDefaultExpanded="True" GroupLoadMode="Client" CommandItemDisplay="None">                              
                                <GroupByExpressions>
                                
                                    <telerik:GridGroupByExpression>
                                        <SelectFields>
                                            <telerik:GridGroupByField FieldName="DomainName" FieldAlias="Domain" FormatString=""
                                                HeaderText=" " HeaderValueSeparator=""></telerik:GridGroupByField>
                                                
                                        </SelectFields>
                                        <GroupByFields>
                                        
                                            <telerik:GridGroupByField SortOrder="Descending" FieldName="DomainName" FormatString=""
                                                HeaderText=""></telerik:GridGroupByField>
                                        </GroupByFields>
                                    </telerik:GridGroupByExpression>
                                    <telerik:GridGroupByExpression>
                                        <SelectFields>
                                            <telerik:GridGroupByField FieldName="SubjectAreaName" FieldAlias="SubjectArea" FormatString=""
                                                HeaderText=" " HeaderValueSeparator=""></telerik:GridGroupByField>
                                        </SelectFields>
                                        <GroupByFields>
                                            <telerik:GridGroupByField SortOrder="Descending" FieldName="SubjectAreaName" FormatString=""
                                                HeaderText=""></telerik:GridGroupByField>
                                        </GroupByFields>
                                    </telerik:GridGroupByExpression>
                                    <telerik:GridGroupByExpression>
                                        <SelectFields>
                                            <telerik:GridGroupByField FieldName="GroupName" FieldAlias="Group" FormatString=""
                                                HeaderText=" " HeaderValueSeparator=""></telerik:GridGroupByField>
                                        </SelectFields>
                                        <GroupByFields>
                                            <telerik:GridGroupByField SortOrder="Descending" FieldName="GroupName" FormatString=""
                                                HeaderText=""></telerik:GridGroupByField>
                                        </GroupByFields>
                                    </telerik:GridGroupByExpression>
                                   
                                </GroupByExpressions>
                                <Columns>
                              <%--   <telerik:GridCheckBoxColumn UniqueName="CheckBox1" HeaderText="CheckBox1"></telerik:GridCheckBoxColumn>
           <telerik:GridCheckBoxColumn UniqueName="CheckBox2" HeaderText="CheckBox2"></telerik:GridCheckBoxColumn>--%>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>

in Cs file

 GridTemplateColumn tempcol = new GridTemplateColumn();
                //GridHeaderItem 
                //GridHeaderItem ghi = new GridHeaderItem();

                tempcol.ItemTemplate = new MySRCheckbox(i, true);
                tempcol.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                tempcol.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                tempcol.ItemStyle.Width = Unit.Pixel(60);
                tempcol.HeaderStyle.Width = Unit.Pixel(80);
                tempcol.HeaderText = cols[i];                
                gvSRSecurity.MasterTableView.Columns.Add(tempcol);

   --check boxes code which i found in above link
    #region add code for grouping

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {

        CreateHeaderControls(e);
    }

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridCommandItem)
        {
            CreateHeaderControls(e);
        }
    }

    void check_CheckedChanged(object sender, EventArgs e)
    {
        CheckBox check = (CheckBox)sender;
        GridGroupHeaderItem groupHeader = (GridGroupHeaderItem)check.NamingContainer;
        GridItem[] children = groupHeader.GetChildItems();
        foreach (GridItem child in children)
        {
            if (child is GridDataItem)
            {
                ((child as GridDataItem)["CheckBox1"].Controls[0] as CheckBox).Checked = (sender as CheckBox).Checked;
            }
        }
    }
    private void CreateHeaderControls(GridItemEventArgs e)
    {
        if (e.Item is GridGroupHeaderItem)
        {
            DataTable dtSRActions;
            dtSRActions = (DataTable)Session["dtSRActions"];
            List<string> cols = (from perm in dtSRActions.AsEnumerable()
                                 select perm.Field<string>("SRPermissionName").ToString()).ToList<string>();

         

            for (int i = 0; i < cols.Count; i++)
            {
                
                GridGroupHeaderItem item = e.Item as GridGroupHeaderItem;
                item.DataCell.Controls.Clear();
                DataRowView groupDataRow = (DataRowView)e.Item.DataItem;
                CheckBox check = new CheckBox();
                check.AutoPostBack = true;
              //  check.Enabled = true;
                check.ID = "CheckAll" + i;
                check.Text = ""; //cols[i];// "Check/Uncheck CheckBox1 column";
                check.CheckedChanged += new EventHandler(check_CheckedChanged);

                CheckBox check2 = new CheckBox();
                check2.AutoPostBack = true;
                check2.ID = "CheckAll_2" + i;
               // check.Enabled = false;
                check2.Text = "";// cols[i];//"Check/Uncheck CheckBox2 column";
                //check2.CheckedChanged += check2_CheckedChanged;
                check2.CheckedChanged +=new EventHandler(check2_CheckedChanged);                   
                item.DataCell.Controls.Add(check);
                item.DataCell.Controls.Add(check2);
            }            
            //Add CheckBox and event handler for every column 
        }
    }

    void check2_CheckedChanged(object sender, EventArgs e)
    {
        CheckBox check = (CheckBox)sender;
        GridGroupHeaderItem groupHeader = (GridGroupHeaderItem)check.NamingContainer;
        GridItem[] children = groupHeader.GetChildItems();
        foreach (GridItem child in children)
        {
            if (child is GridDataItem)
            {
                ((child as GridDataItem)["CheckBox2"].Controls[0] as CheckBox).Checked = (sender as CheckBox).Checked;
            }
        }
    }


    #endregion



Thank you.

Pavlina
Telerik team
 answered on 13 Jan 2014
1 answer
133 views
Hi,

I'm having four chart controls (RadHtmlChart) in a page with drill down option for each of it. I'm using onClientSeriesClicked event and thereby using the AjaxRequest event of the Ajax Manager. As I can have only one Ajax Manager in a page, all my chart controls are pointed to the same AjaxRequest event of the Ajax Manager.

Hence when I drill down on one of the charts, all the other charts are also getting refreshed and shows up empty charts. I do not want to load all the charts everytime I drill down. How can I refresh only one chart where I have drilled down and leave all others as is? Please suggest.

Regards,
Muthiah
Maria Ilieva
Telerik team
 answered on 13 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?