Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
317 views
Hi,
I have a radgrid with an edit form template. There are multiple entry fields in the edit form.
I have a textbox in a radgrid that must be unique. I have created a custom validator for the insert so that it checks to make sure the value does not exist in the database and this works fine. However, if I use the same custom validator in the radgrid edit template, it will not let me update a row with the original value because it sees that it is already in the database. I use  page.isvalid to check before updating the radgrid. How do I get around this issue? Any help is appreciated! Thanks!
Radoslav
Telerik team
 answered on 18 Sep 2012
2 answers
129 views
I am having one heck of a time getting QTP to play fair with these Telerik controls.  The most recent issue, being able to Set a value in an edit.  I can set the value using extra code but for some reason, when a search is invoked, it ignores the entered value and performs an open search.  Here's the QTP code including all the code lines that won't work :(.
    'Enter Branch Office name for LookUp
      '''vSearchedit = "name:=ctl00\$c\$NameTextBox
    Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Click
    Wait 1
    'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Set brNameIn
    'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Type brNameIn
    'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Object.Value = brNameIn
    'Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Object.Click
 
'   ''''have to use this ReplayType technique gotta love telerik
Setting.WebPackage("ReplayType") = 2
    Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).set brNameIn
    Setting.WebPackage("ReplayType") = 1
 
    Wait 1
 
    Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).Click
 
    Wait 1
 
    didSet = Browser(vBrowser).Page(vPage).WebEdit(vSearchEdit).GetROProperty("value")
    If didSet <> "" Then
        Wait 1
        'Press the Search button
        Browser(vBrowser).Page(vPage).WebButton("name:=Search").Click
    Else
        Reporter.ReportEvent micFail, "Set Entity Search", "Unable to set the search value.  Check your code!!!!"
        ExitTestIteration  
    End If

Why in the world would QTP be able to see a value in the edit, but the value is ignored when the search is invoked?  It's not a problem with the search itself as it works if I manually enter my filter into the edit.  I am also including the source from the edit in question in case that might help...
<span class="riSingle RadInput RadInput_Office2007" id="ctl00_c_NameTextBox_wrapper" style="width: 180px;"><input name="ctl00$c$NameTextBox" tabIndex="2" class="riTextBox riEnabled" id="ctl00_c_NameTextBox" style="width: 165px;" type="text" size="20" _events="[object Object]" control="[object Object]" RadInputValidationValue="" /><input name="ctl00_c_NameTextBox_ClientState" id="ctl00_c_NameTextBox_ClientState" type="hidden" autocomplete="off" value='{"enabled":true,"emptyMessage":"","validationText":"","valueAsString":""}' /></span>


Thanks in advance,

Cathy
Vasil
Telerik team
 answered on 18 Sep 2012
1 answer
68 views
Im building a web app using the MVC archirecture (MVC3).  Is it somehow possible to use the RadScheduler in an mvc applcation ?
If so, are there any examples ?
Plamen
Telerik team
 answered on 18 Sep 2012
1 answer
55 views
Hi All,

iam runing into to some techincal issue,i have telerik text box which is customized and i have EnableExtendedEditor icon control which will open text editor to change the value of textbox but when i disable EnableExtendedEditor it s not working i.e not disabling.

my code is like below

<tempo:TextBox runat="server" ID="txtMasterAIName" LabelCssClass="label" ControlCssClass="control" EnableExtendedEditor="true">
                                            <TextBox Width="200px" />
                                                <Label Text="Name:"></Label>
                                            <Validator CssClass="validation" PropertyName="MASTER_AI_NAME" SourceTypeName="CGI.ESG.TEMPO.ViewEntity.AIMasterView, CGI.ESG.TEMPO.ViewEntity"
                                                EnableClientScript="true" />
                                        </tempo:TextBox>

in javascript iam disabling like

 function OnClientSelectedIndexChanged(sender, eventArgs) {
            var item = eventArgs.get_item().get_value();
            var licensePersonCode = sender.get_attributes().getAttribute("LicensePersonCode");
            if (item == licensePersonCode) {
                var txtMasterAIName = $find('<%= txtMasterAIName.ClientID %>');
                txtMasterAIName.EnableExtendedEditor = false;
                launchLicenseeDefinitionWindow();
                return true;
            }

but its throwing javascript if i mention txtMasterAIName.EnableExtendedEditor = false; like object null


below is my custome textbox code
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TempoTextBoxControl.ascx.cs" Inherits="CGI.ESG.TEMPO.Web.CommonControls.TempoTextBoxControl" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="CGI.ESG.TEMPO.Web" Namespace="CGI.ESG.TEMPO.Web.UIBase" TagPrefix="tempo" %>

<asp:Panel ID="pnlLabel" runat="server">
    <span id="lblValidatorFlag" runat="server" class="reqfield">*</span>
    <asp:Label ID="lblText" runat="server" AssociatedControlID="txtData" EnableViewState="false"></asp:Label>
</asp:Panel>
<asp:Panel ID="pnlControl" runat="server">
    <telerik:RadTextBox ID="txtData" runat="server">
    </telerik:RadTextBox>
    <tempo:ExtendedEditorPopup ID="edtPopup" runat="server" TextBoxID="txtData" NavigateUrl="~/Pages/AdvancedEditor.aspx"
        OnModalOK="popupExtendedEditor_ModalOK" OnModalShow="popupExtendedEditor_ModalShow" RadWindowID="wndEditor">
    </tempo:ExtendedEditorPopup>
    <tempo:ClientDataAnnotationValidator ID="valData" runat="server" ControlToValidate="txtData" />
</asp:Panel>


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using Telerik.Web.UI;
using CGI.ESG.TEMPO.Web.UIBase;
using System.Configuration;
using System.Reflection;
using CGI.ESG.TEMPO.Common.Aspects;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace CGI.ESG.TEMPO.Web.CommonControls
{
    [Themeable(true)]
    public partial class TempoTextBoxControl : TempoCommonUserControl
    {
        #region events
        public event EventHandler TextChanged
        {
            add { txtData.TextChanged += value; }
            remove { txtData.TextChanged -= value; }
        }
        #endregion

        #region properties
        protected override string TooltipDefaultText
        {
            get { return lblText.Text; }
        }

        public bool EnableExtendedEditor
        {
            get { return (bool?) ViewState["extEditor"] ?? true; }
            set { ViewState["extEditor"] = value; }
        }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [NotifyParentProperty(true)]
        [Category("Label Settings")]
        public Label Label
        {
            get { return lblText; }
        }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [NotifyParentProperty(true)]
        [Category("TextBox Settings")]
        public RadTextBox TextBox
        {
            get { return txtData; }
        }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        [NotifyParentProperty(true)]
        [Category("Validator Settings")]
        public override ClientDataAnnotationValidator Validator
        {
            get { return valData; }
        }

        public string RequiredFieldIndicatorText
        {
            get { return lblValidatorFlag.InnerText; }
            set { lblValidatorFlag.InnerText = value; }
        }

        #region Label properties
        public string LabelCssClass
        {
            get { return pnlLabel.CssClass; }
            set { pnlLabel.CssClass = value; }
        }
        #endregion

        #region TextBox properties
        public string ControlCssClass
        {
            get { return pnlControl.CssClass; }
            set { pnlControl.CssClass = value; }
        }

        public string Text
        {
            get { return txtData.Text; }
            set { txtData.Text = value; }
        }

        public bool AutoPostBack
        {
            get { return txtData.AutoPostBack; }
            set { txtData.AutoPostBack = value; }
        }
        #endregion
        #endregion

        #region methods
        protected override void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);
        }


        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
        }

        public override string ToolTip
        {
            get
            {
                return txtData.ToolTip;
            }
            set
            {
                txtData.ToolTip = value;
            }
        }

        public bool ReadOnly
        {
            get { return txtData.ReadOnly; }
            set { txtData.ReadOnly = value; }
        }

        protected void popupExtendedEditor_ModalShow(object sender, ModalOpenEventArgs e)
        {
            URLBuilder builder =new URLBuilder(URLBuilder.ServerBaseUrl() + "Pages/AdvancedEditor.aspx");
            builder["mode"] = this.ReadOnly ? "ro" : "rw";
            if (txtData.MaxLength > 0)
            {
                builder["len"] = this.txtData.MaxLength;
            }
            builder["title"] = this.lblText.Text.Replace(":","").Replace("*","");
            e.Url = builder.Url;
        }

        protected void popupExtendedEditor_ModalOK(object sender, ModalCloseEventArgs e)
        {
            if (!this.ReadOnly)
            {
                string newData = e.Result == null ? string.Empty : e.Result as string;
                if(newData != this.Text)
                {
                    this.Text = newData;
                    if (this.Page is TempoPage)
                    {
                        TempoPage page = this.Page as TempoPage;
                        page.IsDirty = page.TrackDirty;
                    }
                }
            }
        }
        #endregion

        protected override void InitializeValidator()
        {
            if (!string.IsNullOrEmpty(valData.SourceTypeName) && !string.IsNullOrEmpty(valData.PropertyName))
            {
                Type dataType = valData.GetValidatedType();
                PropertyInfo property = valData.GetValidatedProperty(dataType);
                object[] stringLengthAttributes = property.GetCustomAttributes(typeof(StringLengthAttribute), true);
                if (stringLengthAttributes.Length > 0)
                {
                    StringLengthAttribute attrib = stringLengthAttributes[0] as StringLengthAttribute;
                    if (attrib.MaximumLength > 0)
                    {
                        txtData.MaxLength = attrib.MaximumLength;
                    }
                }
                object[] requiredAttribute = property.GetCustomAttributes(typeof(RequiredAttribute), true);
                if (requiredAttribute.Length > 0)
                {
                    RequiredValidator = true;
                }
                else
                {
                    RequiredValidator = false;
                }
            }
            else
            {
                RequiredValidator = false;
            }
            ValidatorInitialized = true;
            edtPopup.Visible = txtData.MaxLength > 20 && EnableExtendedEditor != false;
        }

        protected override void SetReadOnly()
        {
            txtData.ReadOnly = true;
        }

        protected override System.Web.UI.HtmlControls.HtmlGenericControl RequiredIndicator
        {
            get { return lblValidatorFlag; }
        }
    }
}

please help me out to resolve the issue
Antonio Stoilkov
Telerik team
 answered on 18 Sep 2012
1 answer
86 views

 



Hi,

I have a quick question . In Telerik’s website,

(http://www.telerik.com/) we see this slider/menu bar at the top. When we click on button next to ‘Product families’ it closes or opens menu. What control does it use? Is it using Telrik controls? We want similar function in our website. I tried using RadMenu but I could not find a way to have Open/Close button at the top of menu for closing and opening menu.

Any help would be appreciated.

 

Thanks,

Kate
Telerik team
 answered on 18 Sep 2012
5 answers
326 views
How can we set the default skin sort style to GridTemplateColumn? It is working for GridBoundColumn but not for GridTemplateColumn. I have tried different colors from the Sortedbackcolor but I couldn't find the default color. Can somebody please help me with this?

<telerik:GridTemplateColumn HeaderText="Status" SortedBackColor="???" SortExpression="Active">
</telerik:GridTemplateColumn>

-Sree  
Galin
Telerik team
 answered on 18 Sep 2012
6 answers
100 views
I am using v2011.3.527.35 and I am having a rendering issue with the RadToolBar in IE8.  Please see attachment (RadToolBar2001.jpg).  There seems to be some overlapping or incorrect offset.  There is a default skin to use the "Default" theme.  The OnLoad function only set the visibility.  I am using the previous versions images, I believe.  Suggestions?

<telerik:RadToolBar ID="RadToolBar1" runat="server" EnableRoundedCorners="true" Style="float: right;"
                    OnButtonClick="MainToolbar_ButtonClick" OnClientButtonClicking="OnClientButtonClicking">
        <Items>
            <telerik:RadToolBarButton CommandName="Back" Text="Back" ImageUrl="~/Images/BackButton.gif" />
            <telerik:RadToolBarButton CommandName="Export" OnLoad="InquiryOrMaintenanceControl_Load" Text="Export" ImageUrl="~/Images/Export.gif" />
            <telerik:RadToolBarButton CommandName="Reset" OnLoad="InquiryOrMaintenanceControl_Load" Text="Reset" ImageUrl="~/Images/Reset.gif" />
            <telerik:RadToolBarButton CommandName="DeleteAll" OnLoad="DeleteAllButton_Load" Text="Delete All" ImageUrl="~/Images/Delete.gif" DisabledImageUrl="~/Images/Delete_d.gif" />
            <telerik:RadToolBarButton CommandName="Retrieve" OnLoad="InquiryOrMaintenanceControl_Load" Text="Retrieve" ImageUrl="~/Images/Retrieve1.gif" />
            <telerik:RadToolBarButton CommandName="Import" OnLoad="MaintenanceOnlyControl_Load" Text="Upload" ImageUrl="~/Images/uploadIcon.gif" />
        </Items>
</telerik:RadToolBar>

Thanks,
Rob
Kate
Telerik team
 answered on 18 Sep 2012
3 answers
166 views
I have a custom skin. I want to replace radcombobox with asp:dropdownlist.

I have following setting
<telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="Select" />

It works fine but i want to change the font size of dropdownlist. For that i am using following style but it doesn't work. What else am i missing.
<style type="text/css">
       .rfdSelect_SkinName .rfdSelectOuter
       {
           font: 12px "Segoe UI" , Arial, sans-serif !important;
       }
   </style>



Bozhidar
Telerik team
 answered on 18 Sep 2012
3 answers
197 views
I am experiencing a problem where RADComboBox does not display the dropdown in Firefox, Chrome, or Opera.  IE9 does work.

Please help
Nencho
Telerik team
 answered on 18 Sep 2012
1 answer
35 views
Hi,

In VB.NET:
I have code which binds the DataSet during first time load and after postback that binded data exist.
In C#:
The same converted code after posback there is no data in RadCombo.

Below are the Telerik.Web.UI Version:
 VB.NET - Autoupdate(Set in Property pages)
    C#    - 2011.3.1115.40

Note: In watch list i have checked the data count in RadCombo,  i noticed after postback Vb.NET code holds the 2 data but in C# no data(Count = 0)

I am struck in this, Please guide to fix this.

Thanks,
Jawahar.
Andrey
Telerik team
 answered on 18 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?