Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
70 views
Hi,
I've a combobox (Property : Width="62px" DropDownWidth="180px")

When I selected an item I see in combobox my selected item, but I see the last character of Text property (The width of combobox is smaller than DropDownWidth)

How Can I select the first char after selected (Javascript,JSon, Ajax... everything solution :-) )

I attached two image for example... In the example I selected the 5° item... I want see "5 AND...." and not "..11,06/11" {the last chars}

Thanks,
Marco
Kate
Telerik team
 answered on 20 Dec 2011
8 answers
282 views
I am trying to format the Excel that is being exported from radGrid and I can't seem to get it to pick up any of the styles. I am using:

protected void imgBtnExportCSV_Click(object sender, EventArgs e)
{
    foreach (GridDataItem item in grdLeadList.MasterTableView.Items) //loop through each grid item
    {
        if (item.Selected)
        {
            selectedItems.Add(item.ItemIndex);
        }
    }
    grdLeadList.ExportSettings.ExportOnlyData = true;
    grdLeadList.ExportSettings.OpenInNewWindow = true;
    grdLeadList.MasterTableView.Columns.FindByUniqueName("ClientSelectColumn").Visible = false;
    grdLeadList.MasterTableView.Columns.FindByUniqueName("EditCommandColumn1").Visible = false;
    grdLeadList.MasterTableView.Columns.FindByUniqueName("CompanyName").ItemStyle.CssClass = "excelHeaderStyle";
    grdLeadList.ExportSettings.FileName = "ColderLeads";
    grdLeadList.MasterTableView.ExportToCSV();
     
}

It finds "CompanyName" I can make it visible false and it goes away. But it won't pick up the "excelHeaderStyle". Am I doing something wrong. Is there a way to style it?

Thanks!
Mira
Telerik team
 answered on 20 Dec 2011
1 answer
122 views
Hi,

Some of the special charaters are not showing properly in hte rad editor
it's displaying unrecognized formate. Please find some unicode below that not showing in the rad editor

𕫠
𕫡
𕫢
𕫣
𕫤
𕫥
𕫦

Pls. suggest me how to go about it

Thank you
Rumen
Telerik team
 answered on 20 Dec 2011
1 answer
72 views
I see that TeamPulse offers Microsoft Lync integration, showing user prescence information about a person, which lets the user click on the little green or red circle next to their name to do "Lync communication" type of actions via the little Lync popup window.

Can I build in Microsoft Lync integration into my custom apps that I build with the Telerik developer tools? Such as I have a RadGrid that lists rows of employees. I'd like the little green/red icons to appear next to their names, just like they do in Microsoft Outlook so a user of my RadGrid could click the green circle in my RadGrid to open Lync-stuff.

Is that available? Or just not yet?  Thanks.

Dave



Daniel
Telerik team
 answered on 20 Dec 2011
7 answers
257 views
Hi Telerik,

I am experiencing this issue on Google Chrome 15.0.874.106 m using Telerik.Web.UI.dll v 2011.2.915.35

I have a RadWindow which points to a separate .aspx page. While this window is loading I take the liberty of setting the state of some controls. I am experiencing something very quirky when I enable my input control, though.

I have attached a 'before' and 'after' picture to this thread, but I've got some explaining to do, too. I put this through a couple of hours of testing and discovered some pretty weird discrepancies in functionality, which I would like to draw attention to. 

Alright, so, here's the code-behind for the page the RadWindow points to:

<%@ Page Language="C#" EnableViewState="False" AutoEventWireup="True" CodeBehind="CustomLocalSettings.aspx.cs" Inherits="CableSolve.Web.Dashboard.Dialog.Windows.CustomLocalSettings" %>
<%@ Import Namespace="CableSolve.Web.Controllers.Managers" %>
 
<!DOCTYPE html>
<html lang="en">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
             
            <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" Runat="Server" />
            <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="Server" DecoratedControls="All" />
 
            <telerik:RadScriptBlock ID="RadScriptBlock1" Runat="Server" >
                <link rel="stylesheet" type="text/css" href="../../../Content/Dashboard/CustomLocalSettings.css?v=<%= VersionManager.GetApplicationVersion() %>" />
            </telerik:RadScriptBlock>
 
            <telerik:RadScriptManager ID="RadScriptManager1" Runat="Server" EnablePageMethods="True">
                <CompositeScript>
                    <Scripts>
                        <asp:ScriptReference Path="~/Scripts/Dashboard/CustomLocalSettings.js" />
                        <asp:ScriptReference Path="~/Scripts/Dashboard/SharedSettingsFunctionality.js" />
                        <asp:ScriptReference Path="~/Scripts/jquery-1.6.4.js" />
                    </Scripts>
                </CompositeScript>
            </telerik:RadScriptManager>
 
            <telerik:RadCodeBlock ID="RadCodeBlock1" Runat="server">
                <script type="text/javascript">
                    var autoRefreshNumericTextBoxID = "<%= AutoRefreshNumericTextBox.ClientID %>";
                    var chartComboBoxID = "<%= ChartComboBox.ClientID %>";
                    var autoRefreshCheckBoxID = "<%= AutoRefreshCheckBox.ClientID %>";
                </script>
            </telerik:RadCodeBlock>
 
            <div id="Content">
                <fieldset id="RefreshProperties">
                    <legend>Refresh Settings</legend>
                    <div id="RefreshArea">
                        <div id="RefreshLeftSide">
                            Auto-Refresh Enabled:
                            <asp:CheckBox ID="AutoRefreshCheckBox" Runat="Server" />
                        </div>
                        <div id="RefreshRightSide">
                            <telerik:RadNumericTextBox ID="AutoRefreshNumericTextBox" Runat="Server" Label="Auto-Refresh Interval (Minutes):" MaxValue="60" MinValue="1" ShowSpinButtons="True" Value="1" Width="225px" DataType="System.Int32">
                                <NumberFormat DecimalDigits="0" AllowRounding="False" />
                            </telerik:RadNumericTextBox>
                        </div>
                    </div>
                </fieldset>
 
                <fieldset id="ChartProperties">
                    <legend>Chart Properties</legend>
                    <div id="ChartArea">
                        <telerik:RadComboBox ID="ChartComboBox" Runat="Server">
                            <Items>
                                <telerik:RadComboBoxItem Runat="Server" Text="Bar Chart" Value="BarChart" />
                                <telerik:RadComboBoxItem Runat="Server" Text="Stacked Bar Chart" Value="StackedBarChart" />
                            </Items>
                        </telerik:RadComboBox>
                    </div>
                </fieldset>
 
                <div class="BottomButton">
                    <asp:UpdatePanel>
                        <ContentTemplate>
                            <telerik:RadButton ID="ApplySettings" Runat="Server" Text="Apply" OnClientClicked="CloseAndSave" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
        </form>
    </body>
</html>

Note that for my example the most-relevant portion of the code is located within the "RefreshProperties" div.
In addition, note that I am able to reproduce this issue with the CSS file commented out. I'll provide it at the end of this document just for the sake of it, but you should not need it.

//SharedSettingsFunctionality.js
 
//Contains functionality that all the dialog windows share in common. I found that I was maintaing a lot of code in multiple places unnecessarily.
function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
 
function OnGetDockAttributesFailure(errors) {
    alert(errors);
}
 
function SetAutoRefreshState() {
    var autoRefreshNumericTextBox = $find(window.autoRefreshNumericTextBoxID);
    var wrapperElement = $get(autoRefreshNumericTextBox._wrapperElementID);
    var label = $(wrapperElement.getElementsByTagName("label")[0]);
    if ($('#' + window.autoRefreshCheckBoxID).is(':checked')) {
        autoRefreshNumericTextBox.enable();
        label.addClass("LabelEnabled");
        label.removeClass("LabelDisabled");
    }
    else {
        autoRefreshNumericTextBox.disable();
        label.addClass("LabelDisabled");
        label.removeClass("LabelEnabled");
    }
}

//CustomLocalSettings.js
 
function pageLoad() {
    var oWindow = GetRadWindow();
    var dockID = oWindow.argument;
 
    if (dockID) {
        InitializeForm(dockID);
    }
    oWindow.argument = null;
}
 
function InitializeForm(dockID) {
    SetAutoRefreshState();
    $('#' + window.autoRefreshCheckBoxID).click(SetAutoRefreshState);
 
    window.PageMethods.GetDockAttributes(dockID, OnGetDockAttributesSuccess, OnGetDockAttributesFailure);
}
 
//Pass the dialog data back to Dashboard.
function CloseAndSave() {
    var oWindow = GetRadWindow();
    var customAttributes = {};
    customAttributes["RefreshEnabled"] = $('#' + window.autoRefreshCheckBoxID).is(':checked');
    customAttributes["RefreshInterval"] = $find(window.autoRefreshNumericTextBoxID).get_value();
    customAttributes["ChartType"] = $find(window.chartComboBoxID).get_value();
    oWindow.argument = customAttributes;
    oWindow.close();
    oWindow.argument = null; //Important because pageLoad gets called once more after oWindow closes.
}
 
function OnGetDockAttributesSuccess(result) {
    var dockData = $.parseJSON(result);
    //Change the initial loading state based on the dock's known settings.
    if (dockData["RefreshEnabled"]) {
        $('#' + window.autoRefreshCheckBoxID).attr('checked', true);
 
        var autoRefreshNumericTextBox = $find(window.autoRefreshNumericTextBoxID);
 
        autoRefreshNumericTextBox.set_value(dockData["RefreshInterval"]);
        autoRefreshNumericTextBox.enable();
 
        var wrapperElement = $get(autoRefreshNumericTextBox._wrapperElementID);
        var label = $(wrapperElement.getElementsByTagName("label")[0]);
        label.addClass("LabelEnabled");
        label.removeClass("LabelDisabled");
    }
 
    $find(window.chartComboBoxID).findItemByValue(dockData["ChartType"]).select();
 
    $('#Content').show();
    GetRadWindow().autoSize();
}

Okay, once again, most of this is not necessary -- but if it came down to it I wanted Telerik to be able to build easily.

Anyway, the following code executes:

  •  CustomLocalSettings - pageLoad (calling InitializeForm);
  •  CustomLocalSettings - InitializeForm (calling SetAutoRefreshState );
  •  SharedSettingsFunctionality - SetAutoRefreshState: This method sets my input controls to disabled initially on default behavior.

At this point the code relevant to this discussion has fired, the window loads, and looks fine. AutoRefreshNumericTextBox is disabled, as well as it's associated CheckBox. The user then clicks the CheckBox to enable the AutoRefreshNumericTextBox. When it becomes enabled, the input holds its location but the label and arrow-adjuster break from their div and drop.

This in itself wasn't that weird, bugs happen, but there's some other weird things to mention:

  1. I have this exact same code on another dialog window which uses ContentTemplate instead of directing to a separate page. It does not experience this issue. Only having the FormDecorator on a page which is loading seems to cause the issue.
  2. If I tell FormDecorator to use DecorationZoneID = "Content" then I see a change in the error. Instead of arising when the input control becomes enabled (the control enables fine..), I see the div break out when I press the 'Up' arrow on the RadNumericTextBox.
  3. Similarly, if I tell the control to skip decorating TextBox's, the control renders fine until I press the 'Up' arrow.

If I disable the FormDecorator I do not see any issues.

I performed a diff of the HTML mark-up being rendered before/after the control breaks from the div. The only change I saw, other than the CssClass changing from LabelEnabled to LabelDisabled, was that the RadNumericTextBox gained maxlength="524288"

The control does not gain this property when it is loaded inside of the ContentTemplate RadWindow.

Other information:

//CustomLocalSettings CSS
 
body
{
    font-size: 12px;
    font-family: "segoe ui", arial, sans-serif;
    overflow: hidden;
    /*Leave this for auto-sizing behavior under IE*/
    width: 403px;
}
 
.LabelEnabled,
.riTextBox
{
    color: Black !important;
}
 
.LabelDisabled
{
    color: Gray !important;
}
 
.BottomButton
{
    padding-top: 7px;
    margin-left: 170px;
    padding-bottom: 7px;
}
 
#RefreshArea
{
    padding: 2px;
}
 
/*Leave this for IE8: Extends the fieldset to make it look proper.*/
#ChartArea
{
    width: 378px;
}
 
#RefreshLeftSide
{
    float: left;
    margin-top: 3px;
}
 
#RefreshRightSide
{
    float: left;
    margin-left: 5px;
}
 
.rfdRoundedWrapper_fieldset
{
    display: block\9 !important;
}
 
#RefreshArea,
#ChartArea
{
    overflow: auto\9;
    margin: 4px 5px 8px 5px\9;
}
 
._Telerik_IE9 #RefreshArea,
._Telerik_IE9 #ChartArea
{
    margin: 0px;
}
 
#Content
{
    display: none;
}

PasteBins for HTML Diffs:

RadWindow which points to .ASPX 


RadWindow using content template:


See attached for 3 screenshots.

Thank you for your time. I hope I have provided enough information for you guys to track this down on your end. Hopefully it's not a super simple mistake on my end... 
Bozhidar
Telerik team
 answered on 20 Dec 2011
6 answers
130 views
Hi,

I'd like to use the dock control as a panel control that works with the normal flow of a web page.  No docking etc functionality.  Is that possible with it as it stands?

If not possible, is there a way to use a div couples with the styles of the Dock to get it working.  

This should be created as a panel control as I'm sure that many developers would find it useful.

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 20 Dec 2011
1 answer
122 views
Hi,

I've a radrotator (which has property

EnableRandomOrder="true"  and

 

PauseOnMouseOver

 

="false"

 

 as below. In the attached image below, Next Item to be shown is Disease Analytics when i click on the ControlButtons in right side. How can i access the index/ item itself on click of the control button in javacript. I need the next item/previous item to be shown when i click on the controlbuttons in javascript only as I've to update the description of the selected item using ajaxmanager and also on random click on the radrotator item(which is an image) corresponding description has to be shown.
 Below is the javascript for

<ControlButtons OnClientButtonClick="OnClientButtonClick" />



function OnClientButtonClick(sender, args) {
 
    var objArgs;
    debugger;
    if (typeof sender._nextItemIndex === "undefined")
        objArgs = 0;
    else {
 
 
        if (sender._nextItemIndex == null)
            objArgs = 0;
        else
            objArgs = sender._nextItemIndex;
    }
    //sender.get_currentItem().get_index();
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(objArgs);
 
}


<telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
       runat="server" DefaultLoadingPanelID="LoadingPanel1">
       <AjaxSettings>
 
           <telerik:AjaxSetting AjaxControlID="chkRotationType">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="radRotProducts" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
               <UpdatedControls>
                   
                   <telerik:AjaxUpdatedControl ControlID="detailsPanel" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>

<telerik:RadAjaxPanel ID="AjaxPanel1" CssClass="rotNoButtonsBack" runat="server" LoadingPanelID="LoadingPanel1">
                      <div class="mainDiv">
                          <div class="rotatorBackground">
                              <%-- ItemWidth and ItemHeight include 2x5(pixels) margin and 1x2(pixels) border --%>
                              <telerik:RadRotator ID="radRotProducts" RotatorType="CarouselButtons" runat="server"
                              EnableRandomOrder="true" PauseOnMouseOver="false"
                              OnClientItemClicked="OnClientItemClicked"    Width="800px" Height="400px" CssClass="rotatorCarouselStyle" ItemHeight="200"
                                  FrameDuration="2000" ItemWidth="300" ScrollDuration="500">
                                  <ItemTemplate>
                                      <asp:Image runat="server" ID="imgProduct" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Image")%>'
                                          CssClass="RotatorItem" />
                                  </ItemTemplate>
                               
                                  <ControlButtons  OnClientButtonClick="OnClientButtonClick" />
                              </telerik:RadRotator>
 
                          </div>
                      </div>
                  </telerik:RadAjaxPanel>
Slav
Telerik team
 answered on 20 Dec 2011
0 answers
171 views
Hi,

i have RadTimePicker that displays times as attached snapshot (radtimepicker.png). so i need to disable hours based on specific criteria.

for example i need to disable and grey-out all the times after 6AM and before 12PM, so i used set_minDate and set_maxDate in java script but not grayed-out just give me warning.

is this possible with radtimepicker to gray-out and disable unallowed times?

following is example of code:



ASPX:

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
     function setAllowedDate(sender, args)
     {
        setMinDate();
        setMaxDate();
     }


     function setMinDate() {
         var timePicker = $find("<%= RadTimePicker1.ClientID %>");
             var date1 = new Date();
             date1.setHours(<%=MinTimeAllowed %>, 0, 0, 0);
             timePicker.set_minDate(date1);
             
     }

     function setMaxDate() {
         var date1 = new Date();
         date1.setHours(<%=MaxTimeAllowed %>, 0, 0, 0);
         var timePicker = $find("<%= RadTimePicker1.ClientID %>");
        
         timePicker.set_maxDate(date1);
     }

    </script>
    <br />
    <br />
    <br />
    Select time:
    <telerik:RadTimePicker ID="RadTimePicker1" runat="server" ZIndex="30001">
    <ClientEvents OnPopupOpening="setAllowedDate" />
    </telerik:RadTimePicker>
    
</asp:Content>




code behind:

public partial class Default2 : System.Web.UI.Page
{
    private int m_MinTimeAllowed=0;
    protected int m_MaxTimeAllowed=24;
    protected void Page_Load(object sender, EventArgs e)
    {
        m_MinTimeAllowed=5;
        m_MaxTimeAllowed = 20;


    }

    protected int MinTimeAllowed
    {
        get
        {
            return m_MinTimeAllowed;
        }
    }


    protected int MaxTimeAllowed
    {
        get
        {
            return m_MaxTimeAllowed;
        }
    }
}




please this task very urgent.

Thanks

Ahamd
Top achievements
Rank 1
 asked on 20 Dec 2011
3 answers
80 views
Hi,
I'm trying to follow the instructions on this page (and the previous help pages) http://www.telerik.com/help/aspnet-ajax/grid-getting-started.html to create a simple web application containing a rad grid. 
The problem is this:
When clicking the grid smart tag for "Choose Data Source", and selecting "New Data Source", the configuration wizard opens without any options. I can't select a SQL database, because that option doesn't appear. The only option which appears is "Site Map".
This is true for both my test application and the Telerik Live Demos - no options in the configuration wizard.
Has anyone encountered this situation?

.Net 3.5, Telerik RadControls for ASP.NET Ajax Q1 2011 SP2
Windows Xp Pro
Visual Studio 2008, C#
Mira
Telerik team
 answered on 20 Dec 2011
1 answer
118 views
Hi
Here is what I am trying to do and was unsuccessful.

The user clicks submit button. If there is already an order with the same ticket number I need to show a confirm window asking user if he/she is sure to submit with the same ticket number. If the user chooses to click on "No" button I do not do anything and ask user to correct the ticket number. If the user clicks on OK I need to redirect user to a different page.

Any help appreciated.

I tried using the RadConfrim method on the window manager but there is no way to get back to server sider after the OK button click. I tried to create a custom radwindow with content template but wasnt sure how to continue further.

THanks
Princy
Top achievements
Rank 2
 answered on 20 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?