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

Hi,

Im using Promethus editor and i have help tool in the toolbar. If i click the help,  it is opening a new window with defualt content. If i would like to add our own customized content, could you pls tell me the way to add the content in the help window of editor.

Thanks
Rumen
Telerik team
 answered on 14 Mar 2008
1 answer
153 views
Hi,

I am looking for a solution to implement a data binded year calendar (multi-month) with multi-day selection.

I do not have any restriction for the db structure. 

Do you have some hint for me on how to use the Calendar control to do that.

Thank you

Erik
Iana Tsolova
Telerik team
 answered on 14 Mar 2008
1 answer
182 views
How to do a manual PostBack to the server?

I'm using combobox as a list of actions and want to send postback only when some items selected.
Also after that I want to select first item or just clear selection.
After Item is selected I generate report on the server and push it to the client in the Response object so I cannot change state of the combobox on the server

I can't use set_cancel because I need to select first element and clearSelection is not doing anything.

Once again. I want to do this.
1. User selects an Item.
2. Form does postback to the server
3. I push file to the client.
4. Combobox should reset to the first item. Or clear selection and set text to default value.

Any help is highly appreciated

Grisha
Veselin Vasilev
Telerik team
 answered on 14 Mar 2008
2 answers
253 views
The main idea of the above property is good.But if I have 10 controls to update the LoadingPanel shows 10 times. That doesn't look very well. I think it would be better in this case to show the loading panel only once and centered in Window or at another location. Or is this still possible and I couldn't find the feature?
Markus
Top achievements
Rank 1
 answered on 14 Mar 2008
13 answers
306 views
Hey,

I've been trying to add media using the media manager. It seems as though SharePoint is stripping away the tags in a publishing site.

Even if I add it manually in the HTML it does that too.

Is there a setting that I need to do to stop this?

Thanks,

Robert.
Stuart
Top achievements
Rank 1
 answered on 14 Mar 2008
4 answers
128 views
I have radeditor in my user control (MyRadEditor.ascx) and im loading this control in another user control (PrintView). i have written setfocus in the ascx page of MyRadEditor

<

script type="text/javascript">

function SetFocusOnRadEditor(clientId)

{

var editor = $find(clientId); //get a reference to RadEditor client object

editor.setFocus();

//set the focus on the the editor

}

</

script>

 when i place the button in  MyRadEditor and onclick of the button , if i call the script, then its perfect . cursor focussed into the editor content area. but when i call the function on the load of editor, nothing rendered.

any way to call the set focus function when the editor loaded. our project is with DNN

meyammai
Top achievements
Rank 1
 answered on 14 Mar 2008
1 answer
139 views

I have a fairly simple grid that onyl has 2 columns in it, Key and Value. It is bound to an ArrayList that contains a struct object. Everything thing works as expected, but when I try and get the value from the EditForm it always returns the original value. Not the value that the user has input. I've tried to approach this from a few different examples on the Website, but I have had no luck thus far. Any ideas on how to get the new value? Below is my code.

Thanks!

Code Behind

using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Linq;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
using Telerik.Web.UI;  
 
 
public partial class Controls_Settings_AppSettings : System.Web.UI.UserControl  
{  
    TelerikSkinning glb = new TelerikSkinning();  
    string skinName = String.Empty;  
 
    public struct appKeys  
    {  
        string mKey, mValue;  
 
        public appKeys(string key, string value)  
        {  
            this.mKey = key;  
            this.mValue = value;  
        }  
 
        public string Key  
        {  
            get 
            {  
                return mKey;  
            }  
            set 
            {  
                mKey = value;  
            }  
        }  
        public string Value  
        {  
            get 
            {  
                return mValue;  
            }  
            set 
            {  
                mValue = value;  
            }  
        }  
    }  
 
    protected void Page_Load(object sender, EventArgs e)  
    {  
        if (!Page.IsPostBack)  
        {  
            SetTelerikTheme();  
        }  
        SetGridSource();  
    }  
 
    protected void SetGridSource()  
    {  
        ArrayList keyList = new ArrayList();  
        foreach (string setting in ConfigurationManager.AppSettings.Keys)  
        {  
            appKeys key = new appKeys(setting, ConfigurationManager.AppSettings[setting]);  
            keyList.Add(key);  
        }  
 
        gridSettings.DataSource = keyList;  
        gridSettings.DataBind();  
    }  
 
    protected void SetTelerikTheme()  
    {  
        string xmlFile = Server.MapPath("~/App_Themes/" + Page.Theme + "/SkinSettings.xml");  
 
        skinName = glb.GetTextBoxSkin(xmlFile);  
    }  
 
    protected void gridSettings_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
    {  
        //Get Configuration  
        Configuration config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");  
 
        if ((e.Item is GridEditableItem) && (e.Item.IsInEditMode))  
        {  
            GridEditableItem edititem = (GridEditableItem)e.Item;  
            TextBox txtKey = (TextBox)edititem["Key"].Controls[0];  
            string strKey = txtKey.Text;  
            TextBox txtValue = (TextBox)edititem["Value"].Controls[0];  
            string strVal = txtValue.Text;  
            //Set Value  
            KeyValueConfigurationElement key = config.AppSettings.Settings[strKey];  
            key.Value = strVal;  
        }           
 
        // Save the configuration file.  
        config.Save();  
 
        // Force a reload of the changed section.  
        ConfigurationManager.RefreshSection("appSettings");  
    }  
} 

User Control

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AppSettings.ascx.cs" Inherits="Controls_Settings_AppSettings" %> 
<%@ Register Assembly="Telerik.Web.UI, Version=2007.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<telerik:RadGrid ID="gridSettings" runat="server" AllowSorting="True" AutoGenerateColumns="False" 
    GridLines="None" Skin="Office2007" OnUpdateCommand="gridSettings_UpdateCommand">  
    <GroupPanel ID="GroupPanel" Style="width: 100%;">  
    </GroupPanel><ExportSettings>  
        <Pdf FontType="Subset" PaperSize="Letter" /> 
        <Excel Format="Html" /> 
    </ExportSettings> 
    <MasterTableView CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" 
        Dir="LTR" Frame="Border" TableLayout="Auto" AllowAutomaticUpdates="false" AllowAutomaticDeletes="false" 
        AllowAutomaticInserts="false" EditMode="InPlace" DataKeyNames="Key">  
        <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
            Visible="False">  
            <HeaderStyle Width="20px" /> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
            Resizable="False" Visible="False">  
            <HeaderStyle Width="20px" /> 
        </ExpandCollapseColumn> 
        <Columns> 
            <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Key" FilterListOptions="VaryByDataType" 
                ForceExtractValue="Always" HeaderText="Key" SortExpression="Key" UniqueName="Key">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="Value" FilterListOptions="VaryByDataType" 
                ForceExtractValue="Always" HeaderText="Value" SortExpression="Value" UniqueName="Value">  
            </telerik:GridBoundColumn> 
            <telerik:GridEditCommandColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">  
            </telerik:GridEditCommandColumn> 
            <telerik:GridButtonColumn CommandName="Delete" CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                Text="Delete" UniqueName="column">  
            </telerik:GridButtonColumn> 
        </Columns> 
        <EditFormSettings> 
            <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">  
            </EditColumn> 
        </EditFormSettings> 
    </MasterTableView></telerik:RadGrid> 
 

Sebastian
Telerik team
 answered on 14 Mar 2008
1 answer
91 views
 I've got a page which uses the tab control and on two of the pages I'm using the Prometheus grid control. When I click on the tab for those pages I get a Javascript error - Object doesn't support this property or method.

If I scroll up to the top of the JS code, it says it's:

Telerik.Web.UI.Common.Toolkit.CommonScripts.js

Unfortunately, I don't see this file anywhere in the Scripts directory (I know it's served out of the webresource.axd, I was just hoping that it was also available externally). At any rate, this is the line of code (in an anonymous function) that is failing:

_1.OnWindowResize();

It appears to fail because it's trying to call OnWindowResize and only has a onWindowResize function. Here's a bit of code around this line, if it helps:

 
Telerik.Web.UI.GridScrolling.callBaseMethod(this,"dispose");  
},_initializeDimensions:function(){  
var _1=this;  
this.applyFrozenScroll();  
this.onWindowResize();  
this.initializeAutoLayout();  
this._owner.get_element().RadResize=function(){  
_1.onWindowResize();  
};  
if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1){  
this._onResizeDelegate=Function.createDelegate(this,this.onWindowResize);  
setTimeout(function(){  
$addHandler(window,"resize",_1._onResizeDelegate);  
},0);  
}else{  
this._onResizeDelegate=Function.createDelegate(this,this.onWindowResize);  
$addHandler(window,"resize",this._onResizeDelegate);  
}  
this._owner.get_element().RadShow=function(){  
_1.OnWindowResize();  
};  
},applyFrozenScroll:function(){  
this.isFrozenScroll=false;  
this._frozenScroll=$get(this._owner.ClientID+"_Frozen");  
var _2=Telerik.Web.UI.Grid.getScrollBarHeight();  
if(this._frozenScroll){  
var _3=$get(this._owner.ClientID+"_FrozenScroll");  

Any ideas on how to fix this or at least work around it?
Vlad
Telerik team
 answered on 14 Mar 2008
1 answer
80 views
I'm using the RadAjaxManager on a page and I want to change some of the javascript on the page with each ajax postback.  For example, I have the following javascript method:

function GetEditorText() {
            <%= _EditorScript %>
        }

As you can see, the _EditorScript variable is declared in the code behind and gets a value whenever the page does a real postback.  The value of this variable is just more javascript that may change. 

How can I change the _EditorScript value (or the javascript in this function) during an ajax postback?

Thanks,
Matt
Maria Ilieva
Telerik team
 answered on 14 Mar 2008
3 answers
339 views
Hi,

I'm trying to create a combobox dynamically and populate it with data from an XML file. 

I am able to get the combobox to show on the page with the first item populated but nothing happens when I click on the arrow to display the rest of the items.  (In debug mode I can see that the OnDisplayDatabinding method is being called for every item and that the label is set with the correct data.)

Please take a look at my code and let me know what I'm doing wrong!

Thanks,
Lina

public partial class DynamicCombo : System.Web.UI.Page  
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        XmlDataSource1.XPath = "/filters/whiteboard/product[@id='WEATHER']/filters/region/option";  
 
        //create a new combobox  
        RadComboBox comboBoxRegion = new RadComboBox();  
        this.Controls.Add(comboBoxRegion);  
 
        comboBoxRegion.ID = "comboBoxRegion";  
        comboBoxRegion.DataTextField = "value";  
        comboBoxRegion.DataSourceID = XmlDataSource1.ID;  
        comboBoxRegion.ItemTemplate = new cbItemTemplate();  
        comboBoxRegion.DataBind();  
 
    }  
}  
 
public class cbItemTemplate : ITemplate  
{  
    public void InstantiateIn(Control container)  
    {  
        Label label = new Label();  
        label.ID = "ItemLabel";  
        label.Text = "Text";  
        label.DataBinding += new EventHandler(OnDisplayDataBinding);  
        container.Controls.Add(label);  
    }  
 
    void OnDisplayDataBinding(object sender, EventArgs e)  
    {  
        Label label = (Label)sender;  
        RadComboBoxItem comboboxitem = (RadComboBoxItem)label.BindingContainer;  
 
        label.Text = (string)DataBinder.Eval(comboboxitem, "Text");  
    }  
} 
Lina
Top achievements
Rank 1
 answered on 14 Mar 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?