Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
178 views

I tried to open RadWindow from RadTileList in OnClientTileClicked event.

RadWindow is opening, however, then it is closed and result shows in same window as RadTileList

 

function OnClientTileClicked(tileList, args) {
            var tile = args.get_tile();
            var url = args.get_oldValue();
 
            //confirm navigation if url has been specified
            if (url !== "") {
                var oManager = GetRadWindowManager();
                var oWnd = oManager.getWindowByName("RadWindow1");
                if (oWnd === null) {
                    oWnd = oManager.open(url, "RadWindow1");
                }
                else
                {
                    oWnd.setUrl(url);
                }
                args.set_cancel(true);
            }
            //request navigation url to be set
            else {
                tile.set_navigateUrl(prompt("No url specified. Please enter a navigation url:"));
            }
        }
 
        function RadWindowOnClientClose(sender, args) {
            if (args.get_argument() !== null) {
            }
        }

 

 

   <telerik:RadTileList ID="RadTileList1" runat="server" Skin="Office2007" Width="930px" Height="500px" OnClientTileClicked="OnClientTileClicked" AutoPostBack="false" SelectionMode="Single" ScrollingMode="Auto">
        <Groups>
            <telerik:TileGroup>
                <telerik:RadTextTile runat="server" NavigateUrl="/Kodes/Algemeen/Komplexen.aspx" Target="_self"
                    Title-ImageUrl="/images/filetypes/access.gif"
                    Title-Text="Wat is gewijzigd" Text="Hier komen de wijzigingen. Dit is een test van een heel lange omschrijving." Shape="Wide">
                    <Badge Value="22" />
                </telerik:RadTextTile>
                <telerik:RadImageAndTextTile runat="server"
                    ImageUrl="~/Images/FileTypes/Powerpoint24.png"
                    Title-ImageUrl="/images/filetypes/access.gif"
                    Title-Text="Gewijzigde prioriteiten kandidaat-huurders" Text="27 aanpassingen" Shape="Wide">
                </telerik:RadImageAndTextTile>
                <telerik:RadTextTile ID="RadTextTile1" runat="server"
                    Title-Text="Gewijzigde prioriteiten kandidaat-huurders" Text="27 aanpassingen">
                </telerik:RadTextTile>
</telerik:TileGroup>
        </Groups>
         
    </telerik:RadTileList>


Any idea ?

Best regards,
Guy Van Dyck
Guynius Software

 

 

Guy
Top achievements
Rank 1
 answered on 04 Dec 2013
2 answers
136 views

This article describes what to do to fix IE11 when you use the RadCompression and .browser file implementation of Hidden field viewstate compression. When we were fixing this issue we found that the solution doesn't work for certain builds/versions of IE11, specifically the version shipped on touch devices. The userAgent string has additional attributes that interrupt the string from matching the RegEx in the IE11 browser node. We modified the expression to the following and it successfully corrected our issue on touch and non-touch versions of IE:

<browser id="IE11" parentID="Mozilla">

<identification>

<userAgent match="Trident\/7.0;(?:(?: Touch;)?(?: \w*;)?)? rv:(?:(?'major'\d+)(\.(?'minor'\d+)?)(?'letters'\w*))(?'extra'[^)]*)" />

<userAgent nonMatch="IEMobile" />

</identification>

Hope this helps anyone that may run into that scenario.

Misho
Telerik team
 answered on 04 Dec 2013
4 answers
144 views
Hi,

I am working on Telerik AJAX 2009 Q1.
I  Need to hide Week No. in RadDatePicker.
Can any one pls suggest me.
Its urgent.
Thanks in Advance.

Natarajan N
Sam
Top achievements
Rank 1
 answered on 04 Dec 2013
9 answers
470 views
With IE9's "Disable script debugging" options unticked (e.g., debugging enabled), I'm getting "SCRIPT16385: Not implemented" and "SCRIPT5009: 'Telerik' is undefined" after upgrading to 2013.3.1114.40. I even did a small test site that only had one basic RadGrid and got the same errors (I tested on multiple IE9 workstations with the same results. So, from the same workstations/IE9 browsers I went to Telerik's demo site (http://demos.telerik.com/aspnet-ajax/) and was riddled with bunch of similar errors.

Is anyone else experiencing this? Any insight on this would be appreciated.
Kostadin
Telerik team
 answered on 04 Dec 2013
1 answer
140 views
hi.
I want the sorting to sort in descending order first rather than ascending which is the default behaviour.
Princy
Top achievements
Rank 2
 answered on 04 Dec 2013
1 answer
141 views
I am having an issue with telerik window. I have changed the styles to remove the border for the window but still it is appearing. The issue happens only in case if window is embedded in a usercontrol. I am unable to attach the project. Below is the source code. In this project there is a dropdown control. If you click on dropdown it will bring a new telerik window which I want to have the borders removed.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FAUSControl.ascx.cs" Inherits="ATR.ePRiSM.Portal.UI.FAUS.FAUSControl" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<script>
    function ShowFausSelector() {
        //OpenRadWindow("FausSelector.aspx", 400, 500);
        var w = document.all("tblFausDropDown").offsetWidth + 10;
        var h = 300;
        oWnd = radopen("about:blank", "RadWindowForFaus");
        oWnd.setSize(w, h);
        oWnd.set_modal(false);
        oWnd.setUrl("http://www.google.com");
        oWnd.set_visibleTitlebar(false);
        oWnd.set_visibleStatusbar(false);
        x = getAbsoluteLeft(document.all("tblFausDropDown")) - 12;
        y = getAbsoluteTop(document.all("tblFausDropDown")) + 20;
 
        oWnd.moveTo(x, y);
    }
    function getAbsoluteLeft(element) {
        try {
            var left = 0;
            var objParent = element;
 
            do {
                left += objParent.offsetLeft;
                objParent = objParent.offsetParent;
            }
            while (objParent != null);
 
            return left;
        }
        catch (x) { }
    }
 
 
    /******************************************************************************
    * Returns the absolute position of the top edge of the specified element.
    *****************************************************************************/
    function getAbsoluteTop(element) {
        try {
            var top = 0;
            var objParent = element;
 
            do {
                top += objParent.offsetTop;
                objParent = objParent.offsetParent;
            }
            while (objParent != null);
 
            return top;
        }
        catch (x) { }
    }
 
</script>
<style>
 
 
.RadWindow_Sunset .rwTopLeft,
.RadWindow_Sunset  .rwTopCenter,
.RadWindow_Sunset .rwTopRight,
.RadWindow_Sunset .rwFooterLeft,
.RadWindow_Sunset .rwFooterRight,
.RadWindow_Sunset .rwFooterCenter,
.RadWindow_Sunset .rwBodyLeft,
.RadWindow_Sunset .rwBodyRight,
.RadWindow_Sunset .rwTitlebar,
.RadWindow_Sunset .rwTitlebar,
.RadWindow_Sunset .rwNoTitlebar,
.RadWindow_Sunset .rwTopResize
   
       background-image: none !important;
   }
.RadWindow_Sunset .rwTitlebar,
.RadWindow_Sunset .rwTitlebar,
.RadWindow_Sunset .rwNoTitlebar
 
{
  display:none !important;
}
 
</style>
<TABLE style="WIDTH: 100%" border=0 id="tblFausDropDown"><TBODY>
<TR>
<TD onclick="ShowFausSelector()" style="WIDTH: 100%">
<DIV id=ReportCriteria_FausTree_divFaus style="BORDER-TOP: #808080 1px solid; HEIGHT: 21px; BORDER-RIGHT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; WIDTH: 100%; BACKGROUND-COLOR: white">
<label runat="server" id="lblFaus"  style="FLOAT: left; PADDING-LEFT: 2px"></label>
 
<IMG style="FLOAT: right" alt="" src="../../images/drop-down-arrow-faus.png" width=17 height=21> </DIV></TD></TR></TBODY></TABLE>
 
 <telerik:RadWindowManager ID="RadWindowManagerFaus" runat="server"  Skin="Sunset"  EnableAjaxSkinRendering="true" VisibleStatusbar="false" VisibleTitlebar="false">
    <Windows>
 <telerik:RadWindow ID="RadWindowForFaus" runat="server"   Skin="Sunset">
      </telerik:RadWindow>
    </Windows>
  </telerik:RadWindowManager>

Above is the code from the ascx file,

Below is the code from page that has the embedded ascx file.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WinTest.Default" %>
 
<%@ Register Src="~/FAUSControl.ascx" TagPrefix="uc1" TagName="FAUSControl" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
              <asp:ScriptManager ID="scriptProcedure" EnablePartialRendering="true" runat="server"></asp:ScriptManager>
  <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
      <telerik:RadWindow ID="RadWindow1" runat="server" VisibleStatusbar="false" VisibleTitlebar="false"  Skin="Vista">
      </telerik:RadWindow>
          <telerik:RadWindow ID="RadWindow2" runat="server" VisibleStatusbar="false" VisibleTitlebar="false"  Skin="Vista">
      </telerik:RadWindow>
 
    </Windows>
  </telerik:RadWindowManager>
        <uc1:FAUSControl runat="server" id="FAUSControl" />
    </div>
    </form>
</body>
</html>


Kindly advise.

Suraj
Marin Bratanov
Telerik team
 answered on 04 Dec 2013
3 answers
188 views
I have a combobox that is filled with a datasource. It filters the dropdown as I type. When I press the enter key, it simply closes the combobox and does nothing. I tried using the onClientKeyPressing event and monitoring on the enter key, but that prevents the combobox from filtering the dropdown entries.

What I want to happen is to be able to type and the dropdown entries filter. When the I press the enter key, I want to execute some javascript code. I want to be able to execute javascript code when the user either selects an entry from the dropdown or presses the enter key.

Here is what I have that does not work.
<telerik:RadComboBox ID="CustomerSearch" runat="server" Width="180" Height="160"
     MarkFirstMatch="true" AllowCustomText="true" CssClass="CustomerSearch" AutoPostBack="false"
     OnClientKeyPressing="HandleKeyPress" EnableVirtualScrolling="true" ShowMoreResultsBox="true"
     EmptyMessage="Enter last, first to search..." BackColor="White" Skin="Forest" />
 
<asp:SqlDataSource ID="dsCustomer" runat="server"
      SelectCommand="CustomerSearchName" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
 
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
            <script type="text/javascript">
                function searchnav(sender, args) {
                    var iframe = document.getElementById('ctl00_iMainPages');
 
                        if (sender.get_value() != null && sender.get_value() != '') {
                            iframe.src = sender.get_value() + '&T=Client';
                        }                  
                }
                function HandleKeyPress(sender, args) {
 
                    if (e.get_domEvent().keyCode == 13) {
                        searchnav(sender, args);
                    }
                }
            </script>
</telerik:RadScriptBlock>
Steve
Top achievements
Rank 1
 answered on 04 Dec 2013
1 answer
141 views
Greetings,

I'm using the following RadGrip markup.  By default the grid renders with all groups collapsed.  When I expand a group, I see all items, but if I edit an item, I lose the expansion of the group and only see the item that I'm editing.  Upon exiting edit mode, I am returned to a collapsed group, causing me to have to re-expand and search for the item that I was working with.  How can I cause the group to remain expanded upon editing and/or exiting edit mode?

            <telerik:RadGrid ID="rgProgramNotes" runat="server" AutoGenerateColumns="false" AllowSorting="true" ShowHeadersWhenNoRecords="true">
                <ClientSettings EnableRowHoverStyle="true" AllowGroupExpandCollapse="True" AllowDragToGroup="False" Selecting-AllowRowSelect="true">
                    <Scrolling  AllowScroll="false" UseStaticHeaders="true" />
                </ClientSettings>
                <MasterTableView TableLayout="Fixed" DataKeyNames="NoteId" GroupLoadMode="Client" GroupsDefaultExpanded="False">
                    <GroupByExpressions>
                      <telerik:GridGroupByExpression>
                        <SelectFields>
                          <telerik:GridGroupByField FieldName="ContactType" HeaderText=" " HeaderValueSeparator="" />
                        </SelectFields>
                        <GroupByFields>
                          <telerik:GridGroupByField FieldName="ContactType" />
                        </GroupByFields>
                      </telerik:GridGroupByExpression>
                    </GroupByExpressions>
                    <ItemStyle Wrap="false" />
                    <AlternatingItemStyle Wrap="false" />
                    <Columns>
                        <telerik:GridButtonColumn ButtonType="LinkButton" ButtonCssClass="k-icon k-edit" HeaderStyle-Width="25px" CommandName="Edit" />
                        <telerik:GridButtonColumn ButtonType="LinkButton" ButtonCssClass="k-icon k-delete" HeaderStyle-Width="25px" CommandName="Delete" ConfirmText="Are you sure you want to delete this Note?" />
                        <telerik:GridBoundColumn DataField="ContactCompany" HeaderText="Contact Company" SortExpression="ContactCompany" HeaderStyle-Width="175px" HeaderStyle-HorizontalAlign="Left" AllowFiltering="false" />
                        <telerik:GridBoundColumn DataField="Date" HeaderText="Date" SortExpression="Date" DataFormatString="{0:MM/dd/yyyy}" HeaderStyle-Width="75px" HeaderStyle-HorizontalAlign="Left" AllowFiltering="false" />
                        <telerik:GridTemplateColumn HeaderText="Description" DataField="Description" HeaderStyle-Width="425px">
                            <ItemTemplate>
                               <%-- <%# Utilties.StringHtmlTagsAndCss(Eval("Description"))%>--%>
                               <asp:Label ID="lblDescription" runat="server"><%# Eval("Description") %></asp:Label>
                               <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="lblDescription" RelativeTo="Mouse" Position="BottomCenter" AutoCloseDelay="0" RenderInPageRoot="true">
                                   <%# Eval("Description") %>
                              </telerik:RadToolTip>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="ContactName" HeaderText="Contact" SortExpression="ContactName" HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Left" AllowFiltering="false" />
                        <telerik:GridBoundColumn DataField="NoteType" HeaderText="Type" SortExpression="NoteType" HeaderStyle-Width="30px" HeaderStyle-HorizontalAlign="Left" AllowFiltering="false" />
                        <telerik:GridBoundColumn DataField="User" HeaderText="Who" SortExpression="User" HeaderStyle-Width="30px" HeaderStyle-HorizontalAlign="Left" AllowFiltering="false" />
                    </Columns>
                    <EditFormSettings EditFormType="WebUserControl" UserControlName="~/Legacy/Ui/NoteTemplate.ascx" />
                </MasterTableView>
            </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 04 Dec 2013
1 answer
136 views
I have a RadGrid and have enabled the drag and drop functionality to allow the dropping of rows onto a Scheduler.  The Scheduler itself is set to use a web service.

When I drop a row onto the Scheduler a new appointment is created on the client side but the web service method InsertAppointment is never called.  After stepping through in a debugger it seems there is an error occurring in this bit of Telerik code:
_storeResources: function(h) {
    var g = [];
    var f = this;
    h.forEach(function(i) {
    Array.add(g, {Key: i.get_key(),Type: i.get_type(),Text: i.get_text(),EncodedKey: i._getInternalKey(),Available: i.get_available(),Attributes: f._storeAttributes(i.get_attributes())});
    });
    return g;
}
The variable i is null, so the methods like i.get_key() do not exist.  Is anyone else seeing this error?  I tried to set up the example code from another post but was unable to attach the database, so it's difficult at this point to tell if I'm doing something wrong or there's a bug.
Plamen
Telerik team
 answered on 04 Dec 2013
1 answer
266 views
Hi all,

I need to extend RadSearchBox because this concept with only Text value (that is not persisted) now is unusable.

Lets say I have a case when I need to set a City to a Person. I have foreign key of the City in the Person entity and I am editing it. Lets also say there are 5 cities of the same name so I need to set VALUE (eg. foreign key) and text is pretty much unusable at this point. I cannot have preset city (if I am editing existing Person that moved to another city) and also I can only get the value after the user selected it (in event) so I cannot have 2 way binding here because VALUE field is only available in Search event.

So my question here is how do I extend RadSearchBox to have VALUE field in 2 way binding scenario? I tried to extend RadSearchBox with 2 hidden fields and overried OnSearch event to store Text and Value in those fields but OnSearch is not overridable so I need some other way to make Value and Text fields persistent or use some other control (please advise which).

Here is my code that I tried which obviously does not work:

public class RadSearchBoxExtender : RadSearchBox, INamingContainer
{
    #region Public properties.
 
    public string Value
    {
        get
        {
            this.EnsureChildControls();
            return this.valueField.Value;
        }
        set
        {
            this.EnsureChildControls();
            this.valueField.Value = value;
        }
    }
 
    public override string Text
    {
        get
        {
            this.EnsureChildControls();
            return this.textField.Value;
        }
        set
        {
            this.EnsureChildControls();
            this.textField.Value = value;
            base.Text = value;
        }
    }
 
    #endregion Public properties.
 
    #region Private methods.
 
    private HiddenField valueField;
    private HiddenField textField;
 
    private string valueFieldId
    {
        get
        {
            return this.ID + "_Value";
        }
    }
 
    private string textFieldId
    {
        get
        {
            return this.ID + "_Text";
        }
    }
 
    #endregion Private methods.
 
    #region Overrides.
 
    protected override void CreateChildControls()
    {
        this.valueField = new HiddenField();
        this.valueField.ID = this.valueFieldId;
        this.valueField.Value = null;
 
        this.textField = new HiddenField();
        this.textField.ID = this.valueFieldId;
        this.textField.Value = null;
 
        this.Controls.Add(this.valueField);
        this.Controls.Add(this.textField);
 
        base.CreateChildControls();
    }
 
    #endregion Overrides.
 
    protected new void OnSearch(SearchBoxEventArgs e)
    {
        base.OnSearch(e);
 
        this.EnsureChildControls();
        this.valueField.Value = e.Value;
        this.textField.Value = e.Text;
    }
 
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
    }
 
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
    }
 
    protected override void Render(System.Web.UI.HtmlTextWriter writer)
    {
        base.Render(writer);
        this.valueField.RenderControl(writer);
    }
}
Plamen
Telerik team
 answered on 04 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?