Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
99 views
In meiner Anwendung habe ich ein TabStrip mit bis zu fünf Tabs.
Beim ersten Laden der Daten in den Tabs, werden alle Tabs untereinander gezeigt, statt immer nur eins.
Sobald ich auf den Überschriftext der Tabs klicke verschwindet ein Tab nach dem anderen und werden anschliessend richtig angezeigt. Ich hoffe sie können mir bei diesem Problem weiterhelfen.
Kate
Telerik team
 answered on 06 Oct 2011
3 answers
129 views
I can use the sample code to create a drop down for the possible values of a field (i.e. to the right hand side of the greater than or equal to or whatever)
However, I want to put a combo box in the place of the field selector itself (the left hand side of the greater than / equal to)
I can successfully create the combo box, but then it appears in the wrong place (the right hand side).  See the code that does this below.

So I tried putting it at position 0..  In InitializeEditor, instead of this line: 

container.Controls.Add(_combo);

I had:
container.Controls.AddAt(0);

This puts it in the correct place, but then I cannot work out how to add the functionality that ensures that when the user clicks on
a particular entry, the text box appears to the right of the greater than/ equal to section?

I think I have to capture the onselected event from the combo box and then create the appropriate textbox control right?
PLEASE HELP!

RadFilterDropDownEditor dropDownFieldEditor = new RadFilterDropDownEditor();
RadFilter1.FieldEditors.Add(dropDownFieldEditor);
  
DataTable dt = MakeTable();

//create the list of fields to select on
foreach (FilterFieldDTO dtoField in filterOptionList)
{
    DataRow row;
    row = dt.NewRow();
      
    row["FieldName"] = dtoField.FieldName;
    string strFieldName;
    if (row["FieldName"].ToString().LastIndexOf(".") > -1)
    {
        strFieldName = row["FieldName"].ToString().Substring(row["FieldName"].ToString().LastIndexOf(".") + 1);
    }
    else
    {
        strFieldName = row["FieldName"].ToString();
    }
      
    row["FieldName"] = strFieldName;
    
    row["DataValueField"] = strFieldName;
    row["DataTextField"] = strFieldName;
    dt.Rows.Add(row);
 }
  
dropDownFieldEditor.DataTextField = "DataTextField";
dropDownFieldEditor.DataValueField = "DataValueField";
dropDownFieldEditor.FieldName = "FieldName";
  
dropDownFieldEditor.DataSource = dt;
Mira
Telerik team
 answered on 06 Oct 2011
5 answers
153 views
Hi, 

I've got an image map, basically a map of a country, split into various regions. when i hover over each region a tooltip is displayed showing information about that region. but what i also want to do is change the image src of the imagemap when that tooltip is displayed. (ive got various images of the same country with each region shaded).

How can i achieve this ? i'd like it to be the case whether the user is over the 'area' of the imagemap or the tooltip.
Alan T
Top achievements
Rank 1
 answered on 06 Oct 2011
6 answers
283 views
Hi,

I have a RadSplitter with Left and Right RadPane. Is it possible to show a loading screen on the right panel when user click menu item on the left one? Sample code is shown on below. 

Cheers, 
Nelson

    <form runat="server" id="mainForm" method="post">
    <!-- content start -->
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Panel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rpContent" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
        <telerik:RadSplitter ID="rsKB" runat="server" Orientation="Horizontal" Width="100%" Height="100%">
            <telerik:RadPane ID="rpMain" runat="server" >
                <telerik:RadSplitter ID="rsMain" runat="server" Orientation="Vertical" Width="100%" Height="100%">
                    <telerik:RadPane ID="rpMenu" runat="server" Width="205px">
                                <asp:Button ID="Button1" runat="server" Text="Click to see the loading image" OnClick="Button1_Click"
            Style="margin-top: 15px; margin-left: 15px" CssClass="qsfButtonBigger" />
                    </telerik:RadPane>
                    <telerik:RadSplitBar ID="RadSplitBar2" runat="server" CollapseMode="Forward">
                    </telerik:RadSplitBar>
                    <telerik:RadPane ID="rpContent" runat="server" ContentUrl="">
                    </telerik:RadPane>                
                </telerik:RadSplitter>
            </telerik:RadPane>
        </telerik:RadSplitter>




    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
      <asp:Image id="Image1" runat="server" ImageUrl="Images/loading.gif">
      </asp:Image>
    </telerik:RadAjaxLoadingPanel>
    <!-- content end -->
    </form>
Dobromir
Telerik team
 answered on 06 Oct 2011
3 answers
215 views
I've been having problems with radEditors rendering properly when they are hidden inside of a div and radAjaxPanel.  In this example the page loads and the user selects a client name and hits the next button.  This saves information to the database and then sets a div to visible in which there is a rad editor.  As you can see from the images I provided the radEditor get blown out across the whole page and not to the width which I am setting it at.  Any help would be appreciated.  Thanks

<%@ Page Title="Projects" Language="C#" MasterPageFile="~/MasterPages/Default.master"
    AutoEventWireup="true" CodeBehind="Projects_New.aspx.cs" Inherits="TED.Web.Projects.Projects_New" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="UserListDialog" runat="server" Style="z-index: 100000;" ReloadOnShow="true"
                AutoSize="true" ShowContentDuringLoad="false" Modal="false" />
        </Windows>
    </telerik:RadWindowManager>
    <asp:ValidationSummary ID="valSummary" runat="server" ValidationGroup="valSummary"
        ShowMessageBox="true" ShowSummary="false" DisplayMode="BulletList" />
    <div>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <asp:Table ID="Table1" class="commandbar" runat="server" CellPadding="0" CellSpacing="1"
                Width="100%">
                <asp:TableRow CssClass="commandbutton">
                    <asp:TableCell Width="10%" HorizontalAlign="Left">
                        <asp:LinkButton ID="lnkSave" runat="server" SkinID="LinkButton_Save" CausesValidation="True"
                            ValidationGroup="valSummary" OnClick="lnkSave_Click"></asp:LinkButton></asp:TableCell>
                    <asp:TableCell Width="80%" HorizontalAlign="Center">
                        <asp:Label ID="Label1" runat="server" SkinID="Label_Bold_10pt">Add/Edit Projects</asp:Label>
                    </asp:TableCell>
                    <asp:TableCell Width="10%" HorizontalAlign="Right">
                        <asp:LinkButton ID="LinkButton1" runat="server" SkinID="LinkButton_Cancel" CausesValidation="False"
                            OnClick="lnkCancel_Click"></asp:LinkButton></asp:TableCell>
                </asp:TableRow>
            </asp:Table>
            <div class="tableAccentFullBlue">
                <br />
                <div class="divLabel">
                    <asp:Label ID="lblProjectID" runat="server" SkinID="Label_Bold_8pt" Text="Project ID:"
                        Width="110px"></asp:Label>
                    <asp:Label ID="projectID" runat="server" SkinID="Label_Bold_8pt"></asp:Label>
                </div>
                <div class="divLabel">
                    <asp:Label ID="lblClientName" runat="server" SkinID="Label_Bold_8pt" Text="Client Name:"
                        Width="110px"></asp:Label>
                    <telerik:RadComboBox ID="ddlClientName" runat="server" Skin="Web20" AllowCustomText="false"
                        MarkFirstMatch="true" Width="300px">
                    </telerik:RadComboBox>
                    <asp:RequiredFieldValidator ID="rfvClientName" runat="server" ControlToValidate="ddlClientName"
                        ValidationGroup="valSummary" ErrorMessage="Client Name Required">*</asp:RequiredFieldValidator>
                </div>
                <div class="divLabel">
                    <asp:Button ID="btnNext" runat="server" Text="Next>>" OnClick="btnNext_Click" CausesValidation="true"
                        ValidationGroup="valSummary" Visible="false" />
                </div>
                <div id="divDetails" runat="server" visible="false">
                    <div class="divLabel">
                        <asp:Label ID="lblProjectType" runat="server" SkinID="Label_Bold_8pt" Text="Project Type:"
                            Width="110px"></asp:Label>
                        <telerik:RadComboBox ID="ddlProjectType" runat="server" Skin="Web20" AllowCustomText="false"
                            MarkFirstMatch="true" Width="200px">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="rfvProjectType" runat="server" ControlToValidate="ddlProjectType"
                            ValidationGroup="valSummary" ErrorMessage="Project Type Required">*</asp:RequiredFieldValidator>
                    </div>
                    <div class="divLabel">
                        <asp:Label ID="lblRM" runat="server" SkinID="Label_Bold_8pt" Text="Project RM:" Width="110px"></asp:Label>
                        <telerik:RadComboBox ID="ddlRM" runat="server" Skin="Web20" AllowCustomText="false"
                            MarkFirstMatch="true" Width="200px">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="rfvRM" runat="server" ControlToValidate="ddlRM" ValidationGroup="valSummary"
                            ErrorMessage="Project RM Required">*</asp:RequiredFieldValidator>
                    </div>
                    <div class="divLabel">
                        <asp:Label ID="lblPM" runat="server" SkinID="Label_Bold_8pt" Text="Project PM:" Width="110px"></asp:Label>
                        <telerik:RadComboBox ID="ddlPM" runat="server" Skin="Web20" AllowCustomText="false"
                            MarkFirstMatch="true" Width="200px">
                        </telerik:RadComboBox>
                        <asp:RequiredFieldValidator ID="rfvPM" runat="server" ControlToValidate="ddlPM" ValidationGroup="valSummary"
                            ErrorMessage="Project PM Required">*</asp:RequiredFieldValidator>
                    </div>
                    <div class="divLabel">
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblDescription" runat="server" SkinID="Label_Bold_8pt" Text="Project Desc:"
                                        Width="110px"></asp:Label>
                                </td>
                                <td>
                                    <telerik:RadEditor ID="txtDesc" runat="server" Width="600" Height="150px" StripFormattingOptions="All"
                                        AllowScripts="false">
                                        <CssFiles>
                                            <telerik:EditorCssFile Value="../App_Themes/Control Themes/EditorContentArea.css" />
                                        </CssFiles>
                                        <Tools>
                                            <telerik:EditorToolGroup>
                                                <telerik:EditorTool Name="AjaxSpellCheck" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                    </telerik:RadEditor>
                                    <asp:RequiredFieldValidator ID="rfvDesc" runat="server" ControlToValidate="txtDesc"
                                        ErrorMessage="Project Desc Required" ValidationGroup="valSummary">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </telerik:RadAjaxPanel>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Top"
            EnableSkinTransparency="true" Transparency="25" Skin="Web20" />
    </div>
</asp:Content>


protected void btnNext_Click(object sender, EventArgs e)
       {
           SaveProject();
           divDetails.Visible = true;
           btnNext.Visible = false;
       }
Rumen
Telerik team
 answered on 06 Oct 2011
1 answer
101 views
Hi,
I am trying to find an item within the toolbar so i can hide it. I have seen the forums and tried this line of code

edit.get_toolAdapter().getToolByName("MainToolbar").get_Items()

it says 'Unable to get value of the property 'get_Items': object is null or undefined'

Am i missing a reference ?


Also is there any default ToolsFIle.xml which i could possibly edit?

Cheers
Sherry
SB
Rumen
Telerik team
 answered on 06 Oct 2011
2 answers
126 views
Hello,
My issue is that when coming from anoher page with a Sesssion variable holding a specific DataKeyName I am unable to see the selected item unless the item is on the current page. I want to know if there is a function like NavigateAndSelect(DataKeyName)  that allows me to first navigate to the specific page and then select an item on that page. If no suh functionality is available then is there a workaround for this?
Best solution for us at this moment is a server-side solution.

Thank you
Mihai
Top achievements
Rank 1
 answered on 06 Oct 2011
2 answers
99 views
hi

on first time using the editor, the first thing i want to change is the background color of the content area.
its currently dk grey so isnt ideal fo rblack text.

how do i make this white?

i tried multiple options but with no joy and cant see anything in documentation relating to this
Mark
Top achievements
Rank 1
 answered on 06 Oct 2011
3 answers
114 views
I have created a hierarchical grid entirely in code behind.  On a grid partialy created I get the mouse over effect of the row changing colour, however with this grid I do not.  Any help with this would be most appreciated. I have tried the example where you set the http://www.telerik.com/help/aspnet/grid/grdsetstyleonmouseover.html, but I get an error 'this.Row is undefined'
mabs
Top achievements
Rank 1
 answered on 06 Oct 2011
1 answer
705 views
From what I understand, the way the demo is set up, when the 'Continue Session' button is clicked, a callback should reset the session on the server, meaning the entire page should not be refreshed. And indeed I do not notice a page refresh on the demo. Yet, my page refreshes every time the session is continued. Is there a way to reset the session without this page refresh?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadNotificationSolution.Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!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>
        <telerik:RadCodeBlock runat="server">
            <script type="text/javascript">
                var timeLeftCounter = null;
                var seconds = 60;
                //a flag to ease the logic which determines whether to redirect the user
                //will not redirect if the RadButton is clicked
                var toRedirect = true;
 
                //stop timers for UI
                function stopTimer(timer) {
                    clearInterval(this[timer]);
                    this[timer] = null;
                };
 
                //reset timers for UI
                function resetTimer(timer, func, interval) {
                    this.stopTimer(timer);
                    this[timer] = setInterval(Function.createDelegate(this, func), interval);
                };
 
                function OnClientShowing(sender, args) {
                    console.log("OnClientShowing()");
                    resetTimer("timeLeftCounter", UpdateTimeLabel, 1000);
                    //raise the flag again so that a redirect will occur if the notification autocloses
                    toRedirect = true;
                }
 
                function OnClientHiding(sender, args) {
                    if (toRedirect) {
                        window.location.href = sender.get_value();
                    }
                }
 
                //update the text in the label in RadNotification
                //this could also be done automatically by using UpdateInterval. However, this will cause callbacks [which is the second best solution than javascript] on every second that is being count
                function UpdateTimeLabel(toReset) {
                    console.log("UpdateTimeLabel():", toReset);
                    var sessionExpired = (seconds == 0);
                    if (sessionExpired) {
                        stopTimer("timeLeftCounter");
                        //redirect to session expired page - simply take the url which RadNotification sent from the server to the client as value
                        window.location.href = $find("RadNotificationSessionTimeout").get_value();
                    } else {
                        var timeLbl = $get("timeLbl");
                        timeLbl.innerHTML = seconds--;
                    }
                }
 
                function ContinueSession() {
                    console.log("ContinueSession()");
                    var notification = $find("RadNotificationSessionTimeout");
                    toRedirect = false;
                    notification.update();
                    notification.hide();
                }
            </script>
        </telerik:RadCodeBlock>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
            <div>
                <asp:Literal runat="server" ID="literalContent"></asp:Literal>
                <telerik:RadNotification ID="RadNotificationSessionTimeout" runat="server" ClientIDMode="Static" Position="Center" Width="240"
                                         Height="200" OnCallbackUpdate="OnCallbackUpdate" Value="/Logout.aspx?timeout=true" AutoCloseDelay="60000"
                                         Title="Stay Signed In?" Skin="Office2010Blue" EnableRoundedCorners="true" OnClientShowing="OnClientShowing" OnClientHiding="OnClientHiding" LoadContentOn="PageLoad" ShowCloseButton="False" >
                    <ContentTemplate>
                        <div class="notificationContent">Time remaining:  <span id="timeLbl">60</span>
                            <%--<telerik:RadButton Skin="Office2007" ID="continueSession" runat="server" Text="Continue Your Session"
                                                Style="margin-top: 10px;" AutoPostBack="false" OnClientClicked="ContinueSession">
                            </telerik:RadButton>--%>
                            <asp:Button ID="continueSession" runat="server" Text="Continue Your Session"
                                        Style="margin-top: 10px;" AutoPostBack="false" OnClientClicked="ContinueSession">
                            </asp:Button>
                        </div>
                    </ContentTemplate>
                </telerik:RadNotification>
            </div>
        </form>
    </body>
</html>

using System;
using Telerik.Web.UI;
 
namespace RadNotificationSolution
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Random random = new Random();
            literalContent.Text = random.Next().ToString();
 
            // Session Timeout Config
            if (!IsPostBack)
            {
                //set the expire timeout for the session
                Session.Timeout = 2;
                //configure the notification to automatically show 1 min before session expiration
                RadNotificationSessionTimeout.ShowInterval = (Session.Timeout - 1) * 60000;
                //set the redirect url as a value for an easier and faster extraction in on the client
                RadNotificationSessionTimeout.Value = Page.ResolveClientUrl("Logout.aspx?timeout=true");
            }
        }
 
        protected void OnCallbackUpdate(object sender, RadNotificationEventArgs e)
        {
 
        }
    }
}
Marin Bratanov
Telerik team
 answered on 06 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?