Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.9K+ views
I have RadGrid with a add link. When click the add link it will pop up a RadWindow and load create.aspx page. When user click save button it will save data to DB and show successful information page. My question is how to refresh the RadGrid of parent page? My Code is as below:

Pop Up page:
 function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }


        function refreshParent(info) {
            var oWindow = GetRadWindow();
            oWindow.BrowserWindow.refreshGrid(info);
        }

Parent Page:
 function refreshGrid(info) {
            $find("<%= RadAjaxManager.ClientID %>").ajaxRequest(info);
        }

<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" OnAjaxRequest="RadAjaxManager_AjaxRequest">.....

In RadAjaxManager_AjaxRequest event, it will rebind the RadGrid.

According my debugging, the RadAjaxManager_AjaxRequest is fired and RadGrid is bound. But the UI still don't show the updated data. Also, The Modal of RadWindow is set as "true"
Waseem
Top achievements
Rank 1
 answered on 04 Apr 2013
0 answers
65 views
Hello,

I have a different question, we are showing the "Design" and "Html", the EditMode buttons for RadEditor. Toolbar is configured as 

Editor.ToolbarMode = Telerik.Web.UI.EditorToolbarMode.PageTop;

There can be several rad editor instances on one page, it is dynamic. It depends on the wish of user that how many they need. Point is that all the editor instances share the same toolbar instance, which is only shown when some editor is activated/focused.

Interesting thing is that when user adds a lot of editors we see the EditMode buttons will all editors, while we want to show these buttons in toolbar. 

Question is that can we move the EditMode buttons to toolbar? Is it possible!!!

Please give me some guideline. 
shadow
Top achievements
Rank 2
 asked on 04 Apr 2013
1 answer
67 views
2013.1.326.40
网页错误详细信息

用户代理: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; Zune 4.7; InfoPath.2)
时间戳: Wed, 3 Apr 2013 08:55:29 UTC


消息: 缺少标识符、字符串或数字
行: 8553
字符: 3
代码: 0
URI: http://localhost/hsw.xa.ui2012/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.7.123%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3azh-CN%3a44981e4a-f654-4c69-b806-cb922fc13d56%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2013.1.326.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3azh-CN%3ad7573cf1-71be-426b-a92a-40c020043c05%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a2003d0b8%3a1e771326%3aaa288e2d%3ae524c98b%3a7165f74%3a58366029%3a874f8ea2%3a19620875%3a39040b5c
Danail Vasilev
Telerik team
 answered on 04 Apr 2013
6 answers
112 views
Hi,

I have seen many topics about how to achieve this. However I am still struggling to get this done. I read that you have to create and add your controls in the ItemCreated event, and bind to it's data inside ItemDataBound. However, this event is never fired on postback, and the controls disappear.

Let's say I try to add a RadButton like below.

How can I keep it working on postback?

protected void grid_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem)
    {
        if (e.Item.DataItem != null)
        {
            int contractid = (e.Item.DataItem as Contract).ContractId;
            var records = GetRecords(contractid);
 
            foreach (var record in records)
            {
                var button = new RadButton();
                button.Text = contractid.ToString();
                button.Click += delegate
                {
                    button.Text = "fired!";
                };
 
                var phContract = (PlaceHolder)e.Item.FindControl("placeholder");
                phContract.Controls.Add(contract);
            }
        }
    }
}
ConsumentenClaim
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
80 views
Hi,
 
We are using radspell from Telerik controls(2010.1.415.35).
 
Here the issue is spellcheck is not working in IE 10.
Its working fine in all other browser(not sure about IE 9).But in IE 10 it is not even displaying.
But after a few clicks, the popup window shows up, but is blank.
 
Could you please help?
Marin Bratanov
Telerik team
 answered on 04 Apr 2013
1 answer
172 views
hi, 
when i do :
$find("<%= AddActiviteWindow.ClientID %>").getWindowBounds();
i get : 
Uncaught TypeError: Cannot read property 'style' of null Telerik.Web.UI.WebResource.axd:7068
a.RadWindow._getCurrentBounds Telerik.Web.UI.WebResource.axd:7068
a.RadWindow._getCalculatedPopupBounds Telerik.Web.UI.WebResource.axd:7097
a.RadWindow.getWindowBounds Telerik.Web.UI.WebResource.axd:6848
reSizeRadeditor
this is because in _getCurrentBounds you do : var c=(this._popupElement.style.display=="none")?true:false;
but you don't check if 
_popupElement exist. In my case because the radwindow is not display, _popupElement is null so i would suggest to add : if (!this._popupElement) return; before this._getCurrentBounds() in the function _getCalculatedPopupBounds

best regards Mathieu




Marin Bratanov
Telerik team
 answered on 04 Apr 2013
6 answers
1.9K+ views
Hi,
in the code behind (vbnet) i created this radtooltip and into tooltip i created this radbutton.

This is the code:

Private button As New RadButton()
 
            button.ID = "btnload"
            button.Text = "load photo"
            button.Skin = "Office2010Silver"
            button.Icon.PrimaryIconCssClass = "rbAdd"
            Dim tip As RadToolTip = New RadToolTip
            tip.ID = "RadTooltip1"
            tip.Controls.Add(button)
            RadAjaxPanel1.Controls.Add(tip)
            tip.TargetControlID = "Imgprofile"
            tip.Width = Unit.Pixel(120)
            tip.Height = Unit.Pixel(30)
            tip.RelativeTo = ToolTipRelativeDisplay.Element
            tip.Position = ToolTipPosition.MiddleRight
            tip.HideEvent = ToolTipHideEvent.ManualClose
            tip.Show()

now i wolud to create a event click of this button because into evento click must start this code:

Dim script As String = "function f(){$find(""" + RadWindowLoadprofile.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)

how can to create the click event?

bye
Danail Vasilev
Telerik team
 answered on 04 Apr 2013
6 answers
109 views
Contrary to what your demo says, the Paragraph Styles dropdown does not insert classes or inline styles that are defined

In this demo, http://demos.telerik.com/aspnet-ajax/editor/examples/formatblock/defaultcs.aspx, insert an 'H5 with an inline style' or an 'H6 with a class.' The H5 or H6 is inserted, but no style or class.

It makes this feature pretty redundant don't you think? Worthy of a demo? I think not.

Matt
shadow
Top achievements
Rank 2
 answered on 04 Apr 2013
5 answers
203 views
I would like to add a button to the toolbar in the file explorer. I saw the example in the documentation and was able to get it working. Now, I would like to change the image of the button (the default seems to be the refresh symbol). I noticed the imageurl property is blank so I decided to set it to an image in my library. The new button is now showing both the default refresh image, and the image I am trying to use.

I know I must be missing something here. Please help.

Thanks!
Tc Blaize
Top achievements
Rank 1
 answered on 04 Apr 2013
5 answers
260 views
If possible please suggest how to ensure a RadGrid in a Master Page has the correct calculated height. I have fixed height content in the Master Page but this content is not accounted for when the grid is sized. Please see the following basic example to explain further:

Master Page
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            height:100%;
            margin: 0px;
            padding: 0px;
            overflow: hidden;   
        }
    </style>
    <asp:ContentPlaceHolder id="head" runat="server" />
</head>
<body>
    <div style="height:100px; background-color:blue;">Test Master Content</div>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" />
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server" />
    </form>
</body>
</html>

Child Page
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" Orientation="Horizontal">
        <telerik:RadPane ID="RadPane1" runat="server" Width="100%" height="50px" BackColor="Red">
            <p>This is a test</p>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
        <telerik:RadPane ID="RadPane2" runat="server" Width="100%" Height="100%">
            <telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>
            <telerik:RadGrid ID="RadGrid1"
                runat="server"
                Width="100%"
                Height="100%"
                OnNeedDataSource="RadGrid1_NeedDataSource" />
    </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>

Pavlina
Telerik team
 answered on 04 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?