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

For the rad window control i have set the Icon. My icon size is 16*16 only. But my icon not displaying properly in the IE7,IE8 and Google Chrome.

Please find the attachments.
Icon Should look like the below image image.
               original.jpg
But in IE7 and IE8 and Chrome looks like below image.
         1. ie icon.jpg (IE 7 and IE8)
         2. chrome.jpg(Google Chrome)


Marin Bratanov
Telerik team
 answered on 22 Feb 2012
1 answer
79 views
Hi

I was using the nested rad dock concept. If i click the button one rad dock will open. inside that rad grid i was calling another rad dock during the button click. When the second rad dock is opened, i should not move to the 1 rad dock, until the 2 rad dock close.Bellow is my code.

 <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
       CssClass="windowCSS" IconUrl="~/images/workstation.ico" Behaviors="Close, Move, Minimize"
        ReloadOnShow="true" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="radwindowsubpopup" runat="server" OnClientClose="OnClientClose"
                AutoSize="true">
            </telerik:RadWindow>
            <telerik:RadWindow ID="radwindowpopup" runat="server" OnClientClose="OnClientClose"
                AutoSize="true">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

During the button Click code is bellow

 function CallLookup(controlID, controlDescriptionID, popupName) {
            var oWnd = radopen(popupName + ".aspx?subpopup=false&controlID=" + controlID + "&controlDescriptionID=" + controlDescriptionID + "", "radwindowpopup");
        }
Slav
Telerik team
 answered on 22 Feb 2012
5 answers
716 views
Hi

I am using RadScriptmanager to combine all the javascript on the page into a single call but it still generates telerik system javascript files.

<telerik:RadScriptManager ID="rsMan" runat="server"
      OutputCompression="Forced" EnableScriptCombine="true" ScriptMode="Auto">
      
      <CompositeScript>
          <Scripts>
           <asp:ScriptReference name="Telerik.Web.UI.Common.jQueryInclude.js" assembly="Telerik.Web.UI"/>
           <asp:ScriptReference name="MicrosoftAjax.js" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
           <asp:ScriptReference name="MicrosoftAjaxWebForms.js" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
           <asp:ScriptReference name="Telerik.Web.UI.Common.Core.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference name="Telerik.Web.UI.Common.jQuery.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference name="Telerik.Web.UI.Common.jQueryPlugins.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference name="Telerik.Web.UI.Common.TouchScrollExtender.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference name="Telerik.Web.UI.Common.Navigation.NavigationScripts.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference name="Telerik.Web.UI.ComboBox.RadComboBoxScripts.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference name="Telerik.Web.UI.Ajax.Ajax.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference name="Telerik.Web.UI.Input.TextBox.RadInputScript.js" assembly="Telerik.Web.UI, Version=2010.3.1317.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
           <asp:ScriptReference Path="~/Scripts/jquery.jcarousel.min.js"  />
                   <asp:ScriptReference Path="~/Scripts/scripts_011612.js" />
       </Scripts>     
      </CompositeScript>
  </telerik:RadScriptManager>

When I look at the page in Firebug under scripts I see this:

1) ScriptResource.axd?d=.... 
the file starts with this:
var jQuery=window.jQuery=window.$=$telerik.$;
// Name: MicrosoftAjax.debug.js
// Assembly: System.Web.Extensions
// Version: 4.0.0.0
// FileVersion: 4.0.30319.237
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjax.js
// Microsoft AJAX Framework.

2) ScriptResource.axd?d=...
This one contains my own javascript

3) Telerik.Web.UI.Webresource.axd?_TSM_Hidden....
Starts with:
/* START MicrosoftAjax.js */
//----------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------
// MicrosoftAjax.js 

4)WebResource.axd?d=....
Starts with: 
function WebForm_PostBackOptions(eventTarget, eventArgument, validation, validationGroup, actionUrl, trackFocus, clientSubmit) {

My question once again is why doesn't it combine all the JavaScript into one single file such as scriptresource.axd. 

Am I doing something wrong?
Simon
Telerik team
 answered on 22 Feb 2012
1 answer
87 views
Hi,

I have the following setup:
I have a usercontrol which I show in a Tooltip (by a RadTooltipmanager). 

<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" HideEvent="ManualClose"
        ManualClose="True" Modal="true" ShowCallout="False" ShowEvent="OnClick" Position="Center"
        OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" ShowDelay="0" RelativeTo="BrowserWindow"
        Height="400" Width="550" CssClass="ToolTip">
 </telerik:RadToolTipManager>

In this usercontrol I have several input-fields.
One of them is a RadDatePicker. 

<telerik:RadDatePicker ID="datePicker" runat="server" ShowPopupOnFocus="True" ZIndex="10000">
</telerik:RadDatePicker>

The ZIndex is set to show the calendar popup above the tooltip.
When I hoover with my mouse over the calendar-button the tooltip closes. The tooptip is set to ManualClose.
When I click on the inputfield the calendar shows but when I move the mouse to the calendar-popup the tooltip is also closed.

What is going wrong here?

Paul 

Marin Bratanov
Telerik team
 answered on 22 Feb 2012
1 answer
110 views
Hi

I have 2 raddock in my page. If i click collapse one should close and another should open. During that time my master page height is not changing. Code below is written to collapse the raddock.

 <script type="text/javascript">
        var allDocks = [];
        function DockInit(dock, args) {
            allDocks[allDocks.length] = dock;
        }
        function DockCommand(dock, args) {
            var commandName = args.command.get_name();
            if (commandName = "ExpandCollapse") {
                if (dock.get_collapsed() == false) {
                    for (var i = 0; i < allDocks.length; i++) {
                        if (allDocks[i] != dock) {
                            allDocks[i].set_collapsed(true);
                        }

                    }
                }
            }
        }
    </script>

See the attached image how its looks
Slav
Telerik team
 answered on 22 Feb 2012
5 answers
191 views
I have two related  radcombobox on Popup editmode : cmbBo and cmbCoquan
ascx file
<script type="text/javascript">
     function GetGridServerElement(serverID, tagName) {
          if (!tagName)
              tagName = "*";

          var grid = $get("<%=RadGridCG.ClientID %>");
          var elements = grid.getElementsByTagName(tagName);
          for (var i = 0; i < elements.length; i++) {
              var element = elements[i];
              if (element.id.indexOf(serverID) >= 0)
                  return element;
          }
       }
       function cmbBoClientSelectedIndexChangedHandler(sender, eventArgs) {
         var cmbCoquan = GetGridServerElement("cmbCoquan");
         cmbCoquan.add_itemsRequested(cmbCoquanItemsRequested);         
         cmbCoquan.requestItems(eventArgs.get_item().get_value(), false);
     }
     function cmbCoquanItemsRequested(sender, eventArgs) {
         if (sender.get_items().get_count() > 0) {
             // pre-select the first item
             sender.findItemByText(sender.get_items().getItem(0).get_text()).select();
         }
         //detach the client items requested event as it not needed any more
         sender.remove_itemsRequested(cmbCoquanItemsRequested);
     }

And in Cs file
protected void RadGridCG_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
        GridEditableItem editItem = (GridEditableItem)e.Item;
        RadComboBox cmbBo = (RadComboBox)editItem.FindControl("cmbBo");
        RadComboBox cmbCoQuan = (RadComboBox)editItem.FindControl("cmbCoQuan");
        cmbBo.OnClientSelectedIndexChanged = "cmbBoClientSelectedIndexChangedHandler";
        cmbCoQuan.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(cmbCoQuan_ItemsRequested);
        //cmbBo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(cmbBo_SelectedIndexChanged);     
    }
}
protected void cmbCoQuan_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
    GridEditableItem editItem = (sender as RadComboBox).NamingContainer as GridEditableItem;
    RadComboBox cmbCoQuan = (RadComboBox)editItem.FindControl("cmbCoQuan");
    cmbCoQuan.DataSource = LoadFilteredCoQuanManually(e.Value);
    cmbCoQuan.DataBind();
}
The  first cmbBo handler event cmbBoClientSelectedIndexChangedHandler successed  but i can't get the second radcombobox (cmbCoquan) , I use GetGridServerElement("cmbCoquan") method and this function not know this control as Radcombobox  (error code on cmbCoquan.requestItems(eventArgs.get_item().get_value(), false))
My Question
: How to get Radcombobox on RadGrid popup  use Javascript function?  Or plz show me demo code for Related combobox on  Radgrid  popup ( Editmode ="PopUp")

Tsvetina
Telerik team
 answered on 22 Feb 2012
1 answer
125 views

Hello!!!

I have a project with radGrid,

Before to add new record I want to add some values on hiding columms;

 protected void RadGrid1_ItemInserted(object sender, Telerik.Web.UI.GridInsertedEventArgs e)
    {

  e.NewValues["IpAddress"] = GetIpAddress();

                e.newvalues["dateandtime"] =date.now;

    }

on deveexpress i use the e.newvalues[""] how can i do on telerik?

all I want is add some info before to insert.

Thansk.

Antonio Stoilkov
Telerik team
 answered on 22 Feb 2012
1 answer
56 views
Hi there,

We would like to rebind the RadGrid before I stream the content to the browser window? Can this be achieved?

Thanks
Antonio Stoilkov
Telerik team
 answered on 22 Feb 2012
3 answers
387 views
Hello,

We are developing webparts for Sharepoint 2010.  There is one strict rule we have to obey - not to modify default sharepoint master pages, because it would be very difficult to support this changes later on when webparts are distributed to clients. From the other hand we would like to modify the master page dynamically, adding RadScriptManager and RadAjaxManager controls from the OnInit event of the webpart.

With RadAjaxManager there is no problem, but replacing the default ScriptManager with RadScriptManager causes a strange exception. To recreate the problem create a blank visual web part and create the OnInit override method like this:

protected override void OnInit(EventArgs e)
{
    base.OnInit(e);
 
    //this is a recomendation of Telerik, do not know if it necessary in Sharepoint 2010?
 
    Page.ClientScript.RegisterStartupScript(typeof(BlankWebPart), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);
    if (this.Page.Form != null)
    {
        string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];
        if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")
        {
            this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";
        }
    }
 
 
    //Remove System.Web.UI.ScriptManager from Page.Form.Controls and Page.Items
    foreach (Control ctr in Page.Form.Controls)
    {
        if (ctr.GetType() == typeof(System.Web.UI.ScriptManager))
        {
            Page.Form.Controls.Remove(ctr);
            break;
        }
    }
    Page.Items.Remove(typeof(ScriptManager));
 
    //Problematic code. If you remove it, no exception
    RadScriptManager rsm = new RadScriptManager();
    // rsm.ID = "RadScriptManager1";
    Page.Items.Add(rsm.GetType(), rsm);
    Page.Form.Controls.AddAt(0, rsm);
 
    //Adding Ajax manager, working ok
    RadAjaxManager ram = new RadAjaxManager();
    ram.ID = "RadAjaxManager1";
    Page.Items.Add(ram.GetType(), ram);
    Page.Form.Controls.AddAt(2, ram);
}

The PageInit is executed without problems, but replacing script manager this way causes an exception later on.

Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.]
   System.Web.UI.ScriptManager.get_IPage() +654824
   System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +59
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +11039454
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3672


Already a day spent fighting with it, but no success.



Cat Cheshire
Top achievements
Rank 1
 answered on 22 Feb 2012
2 answers
175 views
Is there any way to get the count of checked nodes under a given node. The reason is because, i dont want to loop through all nodes and get the checked nodes on the client side. My entire operations are based on the client 
        I was just wondering if i can use the json string in _clientState.checkedNodes to find the count? 
mirang
Top achievements
Rank 1
 answered on 22 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?