Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
106 views
Hi there,

I need to update some of the values of the item being edited in my code-behind based on some values in a custom Edit Form on our Rad Grid. Can I access the item (and update some values) from one of the Grid's event handlers? Currently I'm storing the values in temporary variables and then injecting the new values in the ObjectDataSource's Inserting/Updating event handlers, but it would be much nicer if I could do it all in one spot. (I can't do it all in the ObjectDataSource event handlers as I can't access the controls inside my Grid's Edit Form.)

I've been playing with the ExtractValues and UpdateValues methods of the GridEditableItem object, but I'm not having any luck.

Any tips would be greatly appreciated :)
Iana Tsolova
Telerik team
 answered on 23 Jun 2010
6 answers
2.4K+ views
Hi, I have a website with a lot of telerik Controls.

I have a master page with the radScriptManager in it :

    <telerik:RadScriptManager ID="RadScriptManager2" runat="server"
    </telerik:RadScriptManager> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
    </telerik:RadAjaxManager> 

And in my content page i have :

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"
    <link href="Css/Global.css" rel="stylesheet" type="text/css" /> 
     <script type="text/javascript"
      // A lot of functions here 
</script> 


Is it enough to make it work properly?
Are all the javascript of telerik control already managed by the radscript manager or do i have to declare something else inside?
Will the Javascript of my Content page be managed by default by the radscriptmanager?
If i have Custom Css ON the content page like this

  <style type="text/css"
        .rcbHeader ul, 
.rcbFooter ul, 
.rcbItem ul, .rcbHovered ul, .rcbDisabled ul 
    width: 100%; 
    display: inline-block; 
    margin: 0; 
    padding: 0; 
    list-style-type: none; 
</style> 

and also ONE css file (and just one) in the Css Folder.

Does I need to declare the radstylesheetmanager?
Basel Nimer
Top achievements
Rank 2
 answered on 23 Jun 2010
3 answers
121 views
Hi Telerik team

My scenario is I had a custom button in the editor toolbar which will popup my custom radwindow, I want to pass the current editor value to the popup and do a regular expression search during page load event inside popup. I am trying to assign the whole editor content into a hidden field in a javascript on popup window first, then retrieve the content from radwindow page load event, unfortunately I can't get this value from the hidden field in page load event from radwindow, but I can get the value if there is a postback event fired on the radwindow.

Here is my javascript on my popup radwindow

<script type="text/javascript"
 
    Sys.Application.add_load(loadData); 
 
    function loadData() { 
        var currentWindow = GetRadWindow().BrowserWindow; 
        hidInput = $('#<%=hidContent.ClientID %>'); 
        alert(hidInput.val()); 
        alert(currentWindow.sm5_editor._editor.get_html(false)); 
        //alert(currentWindow.sm5_editor._editor.get_html(false)); 
        hidInput.val(currentWindow.sm5_editor._editor.get_html(false)); 
    } 
</script> 
    <div style="padding-top:20px">Please select a bookmark</div> 
    <div style="padding-top:5px;"
        <telerik:RadComboBox ID="rcbInsertBookmarkLink" runat="server" Width="340"></telerik:RadComboBox> 
    </div> 
    <div style="position:absolute; top:40px; left:362px;"
        <img runat="server" id="imgRedAlert" visible="false" src="~/App_Themes/Modern/images/Icons/16x16/redalert.gif" /> 
    </div> 
<input type="hidden" id="hidContent" value="sadfsadf " runat="server" /> 
</asp:Content> 


Here is my code behind
        protected void Page_Load(object sender, EventArgs e) 
        { 
            Master.cmdOk.Click += cmdOk_Click; 
            if (!IsPostBack) 
            { 
                BindBookmarks(); 
            } 
        } 
 
        protected void BindBookmarks() 
        { 
            //EmailsInfo email = EmailsManager.GetEmail(SmartmailQuerystring.EmailId); 
            string emailContent = HttpUtility.UrlDecode(hidContent.Value); 
 
            var reg = new Regex(EditorText.BookmarkRegex, GetRegOptions()); 
            var bs = (from Match item in reg.Matches(emailContent) 
                      select new BookmarkInfo 
                                 { 
                                     BookmarkName = item.Result("$1"), BookmarkType = BookmarkType.EmailBookmark, BookmarkId = Guid.NewGuid().ToString().Replace("-"""
                                 }).ToList(); 
 
            rcbInsertBookmarkLink.DataTextField = "BookmarkName"
            rcbInsertBookmarkLink.DataValueField = "BookmarkId"
            rcbInsertBookmarkLink.DataSource = bs; 
            rcbInsertBookmarkLink.DataBind(); 
        } 


Vincent
Top achievements
Rank 1
 answered on 23 Jun 2010
9 answers
247 views
Hi!

My problem are that the first time I load the website the Grid shows all the rows with data correct.

Then I want to search for a specific name but it return rows that the grid doesn't show.

The count of Items and total pages are right.

In IE7 all works fine.

Can it be the Databind?

To another problem
 The export to excel function in grid doesn't work in IE8. 
This function work in IE7.

How can i solve this two problems?

Best Regards

Christopher Svensson
System Developer
atespintop.com
Christopher Svensson
Top achievements
Rank 1
 answered on 23 Jun 2010
1 answer
240 views

Hello Telerik team,

I have a requirement to make the rad scheduler read only.
As of now..i have disabled the "save" button inside the edit appointment template.
But now if i click on the new appointment..I wanted to show a alert or rad window which does not allow us to add item to the new appointment.

Kindly let me know the way i need to do it.

Thank you
Smith

Yana
Telerik team
 answered on 23 Jun 2010
1 answer
570 views
I have a solution where the html and document title is fetched by JSON as an object { 'title' : 'my title', 'body' : 'my html here' }. The single quote is returned as encoded \u0027 (') to avoid script errors. The telerik editor is now changing my single quote to &quot; and breaking the html where ' is used? This has happend after an upgrade to latest version. I have tried changing ContentFilters="None" and ContentFilters="ConvertCharactersToEntities" - no change in behavior.
Rumen
Telerik team
 answered on 23 Jun 2010
1 answer
68 views
Hello,

Im trying the trail of Telerik currently. I'm very pleased with ur product and we will most likely buy a developer licence soon.
I have a question.

When dragging a node is it possible to not select the node.

eg:

I have a treeview with lots of nodes. A user can select a node and then the details screen is shown on the right.
When a node is selected the user can drag another node to a grid on the right screen.

The problem i have is that the node that was left clicked should stay selected.
But when u start to drag another node, this dragged node gets the selected style.

Is it possible to leave the selected style to the node that was left clicked?

Thanks in advance

Nikolay Tsenkov
Telerik team
 answered on 23 Jun 2010
1 answer
190 views

I'm trialing the AJAX toolkit and it's fantastic.

I have coded a page that uses a RadRotator, a few RadComboBoxes, a RadStyleSheetManager and a RadScriptManager.

I have placed the RadStyleSheetManager and RadScriptManager just before the closing Form tag hoping this would prioritise the page's content before Telerik's scripting for SEO purposes.

Unfortunately, when the page source is viewed in a browser the following scripts are called at the top of the page, immediately after the opening Form tag.

<script src="/WebResource.axd?...lots of code..." type="text/javascript"></script>
<script src="/Telerik.Web.UI.WebResource.axd?..." type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/Core.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/jQuery.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/jQueryPlugins.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/Animation/AnimationScripts.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Rotator/RadRotator.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/Navigation/NavigationScripts.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/ComboBox/RadComboBoxScripts.js" type="text/javascript"></script>
<script src="/Telerik.Web.UI.WebResource.axd?...lots of code..." type="text/javascript"></script>

How do I force these scripts to the bottom of the page? The RadStyleSheetManager's attributes are set to OutputCompression="AutoDetect" and EnableStyleSheetCombine="true". The RadScriptManager's attributes are set to EnableScriptCombine="true", OutputCompression="AutoDetect" and ScriptMode="Release". I saw something on the Telerik site about a ScriptRegistrar - which looked promising - but can't seem to find it in the VS toolbox or in attributes belonging to the script manager.

Any help would be appreciated!

T. Tsonev
Telerik team
 answered on 23 Jun 2010
1 answer
119 views
Hi,

In our project we have to implement Scheduler.
Can any one suggest which scheduler having more feautes.
Please let me know the Differeneces between ASP.net AJAX Scheduler and SileverLight Scheduler.
Thanks in Advance.
Veronica
Telerik team
 answered on 23 Jun 2010
2 answers
194 views
Hello,

I'm new to Telerik world and creating a RadMenu like this:
       <telerik:RadSiteMap runat="server"   
        ID="RadSiteMapPublications" DataSourceID="RadSiteMapDataPublications" Width="640px">  
        <LevelSettings> 
        <telerik:SiteMapLevelSetting Level="0" ListLayout-RepeatColumns="4" ListLayout-RepeatDirection="Horizontal"></telerik:SiteMapLevelSetting> 
        </LevelSettings> 
        </telerik:RadSiteMap> 
        <telerik:RadSiteMapDataSource ID="RadSiteMapDataPublications" SiteMapFile="~/web.sitemap" ShowStartingNode="false" StartingNodeUrl="http://saratoga/lr/pages/default.aspx?id=2036" runat="server" /> 

which is working fine.

Now, trying to do the same dynamically in the code-behind, it doesn't work. Here is my code:
        Dim myDataSource As New RadSiteMapDataSource  
        myDataSource.SiteMapFile = "~/web.sitemap" 
        myDataSource.ShowStartingNode = False 
        myDataSource.StartingNodeUrl = "http://saratoga/lr/pages/default.aspx?id=2017" 
 
        Dim mySiteMap As New RadSiteMap  
        mySiteMap.Width = 640 
        mySiteMap.Height = 200 
        mySiteMap.DataSource = myDataSource 
 
        Dim mySetting As New SiteMapLevelSetting  
        mySetting.Level = 0 
        mySetting.ListLayout.RepeatColumns = 4 
        mySetting.ListLayout.RepeatDirection = SiteMapRepeatDirection.Horizontal  
 
        mySiteMap.LevelSettings.Add(mySetting)  
 
        myLabel.Controls.Add(mySiteMap) 

"myLabel" is a label on my test page.

I suppose the problem is with the levelSettings, but I don't see where is the error. Could anyone help, please ?
Evelyne Schreiner
Top achievements
Rank 1
 answered on 23 Jun 2010
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?