Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
49 views
Hi guys,

I just purchased a new machine and at present have Windows 8 and IE10 on it.  Looking through the forums I noticed that there seemed to be a lot of teething problems developing with Telerik on Windows 8 and IE10.  I am trying to make a decision on whether to nuke the operating system and put Windows 7 on it?  One thing I rely on a lot are the Telerik examples and also code written by others in the forum to learn.  Is it correct that much of this code will not work in Windows 8 and IE10?  I guess we have to bite the bullet at some stage as most new machines being shipped will have this configuration.

Just looking for your opinion on the level of compatibility of old code when developing with Windows 8 and IE10?

What type of transition problems should I expect?

Particularly interested in others that have recently made this transition!

Many thanks.

Cheers

Ian.
Slav
Telerik team
 answered on 08 Jan 2013
5 answers
157 views
Quick background - I have a grid of users that loads some information when a user (row) is selected. If some of that information changes, the page is flagged so that when a new user is picked before saving, a confirmation box appears. Clicking OK discards the changes and selects the new user, Cancel...well, cancels the new user selection. Functionally, this works fine, but even after cancelling the new row is highlighted. How can I stop this?

Relevant code:
<ClientSettings EnablePostBackOnRowClick="True">
    <Selecting AllowRowSelect="True"/>
    <Scrolling UseStaticHeaders="True" AllowScroll="True" SaveScrollPosition="True"/>
    <ClientEvents OnRowSelecting="rgUsers_RowSelecting"/>
</ClientSettings>
function rgUsers_RowSelecting(sender, args)
{
    var changed = $get("formChanged").value;
 
    if (changed > 0) {
        if(confirm("Your changes will be discarded. Click OK to continue."))
        {
            $get("hfFormChanged").value = "0";
        }
        else
        {
            args.set_cancel(true);
        }
    }
}

It is worth noting that I've tested and checked the data to make sure the select is indeed cancelled.

Edit: Also, I am forced to use Internet Explorer. Could be a factor.

Edit 2: As far as this goes, I have found the problem. I had EnablePostBackOnRowClick="True" in the ClientSettings. This was causing the ItemCommand event to be fired on the server. In ItemCommand, I was doing something with RowClick, and this was the problem. Thanks for your help.
J
Top achievements
Rank 1
 answered on 08 Jan 2013
4 answers
420 views
Hi,

 We are trying to disable the Hover CSS on the calendar. The problem is that we have multiple special days configured with a custom background class

In the C# Code on the Page_Load event

RadCalendarDay

 

testCal = new RadCalendarDay();

 

testCal.Date =

DateTime.Now;

 

testCal.Repeatable =

RecurringEvents.None;

 

testCal.ToolTip =

"SpecialDay1";

 

testCal.ItemStyle.CssClass =

"SpecialDay1";

CSS Definition

.SpecialDay1

{

 

background-colorred;

 

}


However when we hover over it uses the .rcHover class which we don't want applied.

We have tried creating a new Skin using the tutorial and removed the .RadCalendar_SpecialTest .rcRow .rcHover class without any avail. We have been able to override the .rcSelected class which works fine, however its just the .rcHover class which we have the problem with.

Can someone please help?

Cheers,
Jonathan
Patricia Ligon
Top achievements
Rank 1
 answered on 08 Jan 2013
1 answer
98 views
Hi,

I am trying to add a AutoCompleteBox on the advanced form of RadScheduler which is a provided sample from TelerikBut the control is somehow disabled after rendering, it can not take input cursor in the input box. I have tried to add other controls to the same form, they all work fine. The below are the screenshot and the code.

Thanks a lot.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdvancedForm.ascx.cs"
    Inherits="RadSchedulerAdvancedFormAdvancedForm" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="scheduler" TagName="ResourceControl" Src="ResourceControl.ascx" %>
<%@ Register TagPrefix="scheduler" TagName="MultipleValuesResourceControl" Src="MultipleValuesResourceControl.ascx" %>
<div class="rsAdvancedEdit rsAdvancedModal" style="position: relative">
    <div class="rsModalBgTopLeft">
    </div>
    <div class="rsModalBgTopRight">
    </div>
    <div class="rsModalBgBottomLeft">
    </div>
    <div class="rsModalBgBottomRight">
    </div>
    <%-- Title bar. --%>
    <div class="rsAdvTitle">
        <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%>
        <h1 class="rsAdvInnerTitle">
            <%= (this.Mode.ToString() == "Edit") ? Owner.Localization.AdvancedEditAppointment : Owner.Localization.AdvancedNewAppointment %></h1>
        <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose"
            CommandName="Cancel" CausesValidation="false" ToolTip='<%# Owner.Localization.AdvancedClose %>'>
            <%= Owner.Localization.AdvancedClose %>
        </asp:LinkButton>
    </div>
    <div class="rsAdvContentWrapper">
        <%-- Scroll container - when the form height exceeds MaximumHeight scrollbars will appear on this element--%>
        <div class="rsAdvOptionsScroll">
            <asp:Panel runat="server" ID="AdvancedEditOptionsPanel" CssClass="rsAdvOptions">
                <asp:Panel runat="server" ID="BasicControlsPanel" CssClass="rsAdvBasicControls" OnDataBinding="BasicControlsPanel_DataBinding">
                    <telerik:RadTextBox runat="server" ID="SubjectText" Width="100%" Label='<%# Owner.Localization.AdvancedSubject + ":" %>'
                        EnableSingleInputRendering="false" />
                    <asp:RequiredFieldValidator runat="server" ID="SubjectValidator" ControlToValidate="SubjectText"
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                    <ul class="rsTimePickers">
                        <li class="rsTimePick" style="width: 244px;">
                            <label for='<%= StartDate.ClientID %>_dateInput_text'>
                                <%= Owner.Localization.AdvancedFrom %>:
                            </label>
                            <%--
                                Leaving a newline here will affect the layout, so we use a comment instead.
                            --%><telerik:RadDatePicker runat="server" ID="StartDate" CssClass="rsAdvDatePicker"
                                Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                MinDate="1900-01-01">
                                <DatePopupButton Visible="False" />
                                <DateInput ID="DateInput2" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                    EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />
                            </telerik:RadDatePicker>
                            <%--
                             
                            --%><telerik:RadTimePicker runat="server" ID="StartTime" CssClass="rsAdvTimePicker"
                                Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'>
                                <DateInput ID="DateInput3" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" "
                                    EnableSingleInputRendering="false" />
                                <TimePopupButton Visible="false" />
                                <TimeView ID="TimeView1" runat="server" Columns="2" ShowHeader="false" StartTime="08:00"
                                    EndTime="18:00" Interval="00:30" />
                            </telerik:RadTimePicker>
                        </li>
                        <li class="rsTimeZonesWrapper">
                            <telerik:RadComboBox runat="server" Visible="true" ID="TimeZonesDropDown" Width="230"
                                Label="<%# Owner.Localization.AdvancedTimeZone + ':' %>" Skin='<%# Owner.Skin %>'>
                            </telerik:RadComboBox>
                        </li>
                        <li class="rsAllDayWrapper">
                            <asp:CheckBox runat="server" ID="AllDayEvent" CssClass="rsAdvChkWrap" Checked="false" />
                        </li>
                        <li class="rsTimePick rsEndTimePick" style="width: 244px;">
                            <label for='<%= EndDate.ClientID %>_dateInput_text'>
                                <%= Owner.Localization.AdvancedTo%>:
                            </label>
                            <%--
                             
                            --%><telerik:RadDatePicker runat="server" ID="EndDate" CssClass="rsAdvDatePicker"
                                Width="83px" SharedCalendarID="SharedCalendar" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'
                                MinDate="1900-01-01">
                                <DatePopupButton Visible="False" />
                                <DateInput ID="DateInput4" runat="server" DateFormat='<%# Owner.AdvancedForm.DateFormat %>'
                                    EmptyMessageStyle-CssClass="riError" EmptyMessage=" " EnableSingleInputRendering="false" />
                            </telerik:RadDatePicker>
                            <%--
                            FT
                            --%><telerik:RadTimePicker runat="server" ID="EndTime" CssClass="rsAdvTimePicker"
                                Width="65px" Skin='<%# Owner.Skin %>' Culture='<%# Owner.Culture %>'>
                                <DateInput ID="DateInput5" runat="server" EmptyMessageStyle-CssClass="riError" EmptyMessage=" "
                                    EnableSingleInputRendering="false" />
                                <TimePopupButton Visible="false" />
                                <TimeView ID="TimeView2" runat="server" Columns="2" ShowHeader="false" StartTime="08:00"
                                    EndTime="18:00" Interval="00:30" />
                            </telerik:RadTimePicker>
                        </li>
                    </ul>
                    <div class="rsReminderWrapper">
                        <telerik:RadComboBox runat="server" ID="ReminderDropDown" Label="<%# Owner.Localization.Reminder + ':' %>"
                            Width="120px" Skin='<%# Owner.Skin %>'>
                            <Items>
                                <telerik:RadComboBoxItem Text='<%# Owner.Localization.ReminderNone %>' Value="" />
                                <telerik:RadComboBoxItem Text='<%# "0 " + Owner.Localization.ReminderMinutes %>'
                                    Value="0" />
                                <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderMinutes %>'
                                    Value="5" />
                                <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderMinutes %>'
                                    Value="10" />
                                <telerik:RadComboBoxItem Text='<%# "15 " + Owner.Localization.ReminderMinutes %>'
                                    Value="15" />
                                <telerik:RadComboBoxItem Text='<%# "30 " + Owner.Localization.ReminderMinutes %>'
                                    Value="30" />
                                <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderHour %>' Value="60" />
                                <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderHours %>' Value="120" />
                                <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderHours %>' Value="180" />
                                <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderHours %>' Value="240" />
                                <telerik:RadComboBoxItem Text='<%# "5 " + Owner.Localization.ReminderHours %>' Value="300" />
                                <telerik:RadComboBoxItem Text='<%# "6 " + Owner.Localization.ReminderHours %>' Value="360" />
                                <telerik:RadComboBoxItem Text='<%# "7 " + Owner.Localization.ReminderHours %>' Value="420" />
                                <telerik:RadComboBoxItem Text='<%# "8 " + Owner.Localization.ReminderHours %>' Value="480" />
                                <telerik:RadComboBoxItem Text='<%# "9 " + Owner.Localization.ReminderHours %>' Value="540" />
                                <telerik:RadComboBoxItem Text='<%# "10 " + Owner.Localization.ReminderHours %>' Value="600" />
                                <telerik:RadComboBoxItem Text='<%# "11 " + Owner.Localization.ReminderHours %>' Value="660" />
                                <telerik:RadComboBoxItem Text='<%# "12 " + Owner.Localization.ReminderHours %>' Value="720" />
                                <telerik:RadComboBoxItem Text='<%# "18 " + Owner.Localization.ReminderHours %>' Value="1080" />
                                <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderDays %>' Value="1440" />
                                <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderDays %>' Value="2880" />
                                <telerik:RadComboBoxItem Text='<%# "3 " + Owner.Localization.ReminderDays %>' Value="4320" />
                                <telerik:RadComboBoxItem Text='<%# "4 " + Owner.Localization.ReminderDays %>' Value="5760" />
                                <telerik:RadComboBoxItem Text='<%# "1 " + Owner.Localization.ReminderWeek %>' Value="10080" />
                                <telerik:RadComboBoxItem Text='<%# "2 " + Owner.Localization.ReminderWeeks %>' Value="20160" />
                            </Items>
                        </telerik:RadComboBox>
                    </div>
                    <asp:RequiredFieldValidator runat="server" ID="StartDateValidator" ControlToValidate="StartDate"
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                    <asp:RequiredFieldValidator runat="server" ID="StartTimeValidator" ControlToValidate="StartTime"
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                    <asp:RequiredFieldValidator runat="server" ID="EndDateValidator" ControlToValidate="EndDate"
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                    <asp:RequiredFieldValidator runat="server" ID="EndTimeValidator" ControlToValidate="EndTime"
                        EnableClientScript="true" Display="None" CssClass="rsValidatorMsg" />
                    <asp:CustomValidator runat="server" ID="DurationValidator" ControlToValidate="StartDate"
                        EnableClientScript="false" Display="Dynamic" CssClass="rsValidatorMsg rsInvalid"
                        OnServerValidate="DurationValidator_OnServerValidate" />
                </asp:Panel>
                <asp:Panel runat="server" ID="AdvancedControlsPanel" CssClass="rsAdvMoreControls">
                    <label>
                        Color:
                    </label>
                    <telerik:RadColorPicker ID="AppointmentColorPicker" runat="server" CssClass="rsAdvResourceValue"
                        ShowIcon="true" PaletteModes="WebPalette">
                    </telerik:RadColorPicker>
                    <asp:Panel runat="server" ID="ResourceControls">
                        <%-- RESOURCE CONTROLS --%>
                        <ul class="rsResourceControls">
                            <li>
                                <!-- Resource controls should follow the convention Res[Resource Name] for ID -->
                                <scheduler:ResourceControl runat="server" ID="ResTeacher" Type="Teacher" Label="Teacher:"
                                    Skin='<%# Owner.Skin %>' />
                            </li>
                            <li>
                                <scheduler:MultipleValuesResourceControl runat="server" ID="ResStudent" Type="Student"
                                    Label="Student: " />
                            </li>
                            <!-- Optionally add more ResourceControl instances here -->
                        </ul>
                    </asp:Panel>
                </asp:Panel>
                <telerik:RadTextBox runat="server" ID="DescriptionText" TextMode="MultiLine" Columns="50"
                    Rows="5" Width="100%" Label='<%# Owner.Localization.AdvancedDescription + ":" %>'
                    Text='<%# Eval("Description") %>' EnableSingleInputRendering="false" />
                <span class="rsAdvResetExceptions">
                    <asp:LinkButton runat="server" ID="ResetExceptions" OnClick="ResetExceptions_OnClick" />
                </span>
                <telerik:RadSchedulerRecurrenceEditor runat="server" ID="AppointmentRecurrenceEditor" />
                <asp:HiddenField runat="server" ID="OriginalRecurrenceRule" />
                <telerik:RadCalendar runat="server" ID="SharedCalendar" Skin='<%# Owner.Skin %>'
                    CultureInfo='<%# Owner.Culture %>' ShowRowHeaders="false" RangeMinDate="1900-01-01" />
            </asp:Panel>
            <telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" Width="400" DropDownWidth="200"
                DataSourceID="SqlDataSource1" DataTextField="Name" DataValueField="StudentID" CssClass="">               
            </telerik:RadAutoCompleteBox>
            <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:TelerikVSXConnectionString %>"
                ProviderName="System.Data.SqlClient" SelectCommand="SELECT [StudentID], [Name] FROM [DbProvider_Students] ORDER By Name">
            </asp:SqlDataSource>
            <telerik:RadTextBox runat="server" ID="DescriptionTexta">
            </telerik:RadTextBox>
            <telerik:RadComboBox runat="server" AllowCustomText="true" DataSourceID="SqlDataSource1"
                DataTextField="Name" DataValueField="StudentID">
            </telerik:RadComboBox>
        </div>
        <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">
            <div class="rsAdvButtonWrapper">
                <asp:LinkButton runat="server" ID="UpdateButton" CssClass="rsAdvEditSave">
                    <span><%= Owner.Localization.Save %></span>
                </asp:LinkButton>
                <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel"
                    CausesValidation="false">
                    <span><%= Owner.Localization.Cancel %></span>
                </asp:LinkButton>
            </div>
        </asp:Panel>
    </div>
</div>

Kalina
Telerik team
 answered on 08 Jan 2013
1 answer
53 views
Hello,

I am using the load on demand for creating RadTab and Pageview dynamically, the problem i am facing is that on first the page is loaded properly, and when i seleting the next tab the page causes postback and works fine too, but after that my page freezes(no postback occurs on selecting different tabs, it seems like everything freezes). I tried by removing the timer event too but did not succeed.
        <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanelTimed">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanelTimed" LoadingPanelID="LoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <asp:Timer runat="server" ID="UpdateTimer" Interval="40000" />
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanelTimed" OnAjaxSettingCreating="RadAjaxPanelTimed_AjaxSettingCreating" >
            <telerik:RadTabStrip ID="tabSocialNetwork" runat="server" OnClientTabSelecting="OnClientTabSelecting" SelectedIndex="0" MultiPageID="radMultiPage"
               OnTabClick="OnRadTab_SocialAccountClick">
            </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="radMultiPage" runat="server" RenderSelectedPageOnly="true" SelectedIndex="0" Width="100%"
                Height="500px" OnPageViewCreated="RadMultiPage1_PageViewCreated">
            </telerik:RadMultiPage>
        </telerik:RadAjaxPanel>
 
 
 
CodeBehind:
 
 
#region Load Event
        protected void Page_Load(object sender, EventArgs e)
        {
 
            if (!IsPostBack)
            {
                objSocialNetworkBF = new SocialNetworkBF();
                DataTable dtSocialAccount = objSocialNetworkBF.GetSocialAccount(compId, userId);
                ViewState["SocialAccount"] = dtSocialAccount;
                txtMessage.Attributes.Add(PureAnalyzer_WebApp.Onkeydown, PureAnalyzer_WebApp.EnterKeyPrevent);
                btnSendItNow.Attributes.Add(PureAnalyzer_WebApp.Onkeydown, PureAnalyzer_WebApp.EnterKeyPrevent);
                if (dtSocialAccount != null && dtSocialAccount.Rows.Count > 0)
                {
                    foreach (DataRow dr in dtSocialAccount.Rows)
                    {
                        SocialAccId = dr["SocialAccId"].ToString();
                        SocialAccount = dr["SocialAccount"].ToString();
                        AddTab(dr["SocialAccountScreenName"].ToString() + PureAnalyzer_WebApp.OpenBracket + dr["SocialAccount"].ToString() + PureAnalyzer_WebApp.ClosedBracket);
                       
                    }
                   // UpdateTimer.Interval = 60000;
                }
 
            }
        }
 
        #endregion
        #region Add radtab
        private void AddTab(string tabName)
        {
             
            RadTab tab = new RadTab();
            tab.Text = tabName;
            //tab.PostBack = true;
            tab.Value = tabName + "(" + SocialAccId + ")";
            tabSocialNetwork.Tabs.Add(tab);
            tab.ToolTip = tabName;
 
            if (flag)
            {
                AddPageView(tab);
                flag = false;
            }
        }
        #endregion
 
        #region OnRadTab click event
        protected void OnRadTab_SocialAccountClick(object sender, RadTabStripEventArgs e)
        {
            AddPageView(e.Tab);
            e.Tab.PageView.Selected = true;
        }
        #endregion
 
        #region Method to add pageview
        private void AddPageView(RadTab tab)
        {
            RadPageView pageView = new RadPageView();
            Guid pageViewGuid;
            pageViewGuid = Guid.NewGuid();
            string[] strAccVal = tab.Value.Split('(');
            pageView.ID = strAccVal[1].Remove(strAccVal[1].IndexOf(')')) + "," + strAccVal[2].Remove(strAccVal[2].IndexOf(')')) + "," + pageViewGuid.ToString();
            radMultiPage.PageViews.Add(pageView);
            tab.PageViewID = pageView.ID;
        }
        #endregion
 
        #region Rad multipage view created
        int Iteration = 0;
        protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)
        {
            string []strPageviewID = e.PageView.ID.Split(',');
 
            if (!IsPostBack)
            {
                if (strPageviewID[0] == "Twitter")
                {
                    string userControlName = "TwitterConnect.ascx";
                    Control userControl = Page.LoadControl(userControlName);
                    Guid userControlTwitterGuid = Guid.NewGuid();
                    userControl.ID = userControlTwitterGuid.ToString() + "," + strPageviewID[1];
                    e.PageView.Controls.Add(userControl);
                }
                else if (strPageviewID[0] == "FaceBook")
                {
                    string userControlName = "FacebookConnect.ascx";
                    Control userControl = Page.LoadControl(userControlName);
                    Guid userControlFacebookGuid = Guid.NewGuid();
                    userControl.ID = userControlFacebookGuid.ToString() + "," + strPageviewID[1];
                    e.PageView.Controls.Add(userControl);
                }
            }
            else
            {
                if (strPageviewID[0] == "Twitter")
               {
                   string userControlName = "TwitterConnect.ascx";
                   Control userControl = Page.LoadControl(userControlName);
                   Guid userControlTwitterGuid = Guid.NewGuid();
                   userControl.ID = userControlTwitterGuid + "," + strPageviewID[1];
                   e.PageView.Controls.Add(userControl);
                   Iteration++;
               }
                else if (strPageviewID[0] == "FaceBook")
               {
                   string userControlName = "FacebookConnect.ascx";
                   Control userControl = Page.LoadControl(userControlName);
                   Guid userControlFacebookGuid = Guid.NewGuid();
                   userControl.ID = userControlFacebookGuid + "," + strPageviewID[1];
                   e.PageView.Controls.Add(userControl);
                   Iteration++;
               }
                
            }
             
        }
        #endregion
 
        #region RadPanel Ajaxsetting created
        protected void RadAjaxPanelTimed_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e)
        {
            AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
            trigger.ControlID = UpdateTimer.ID;
            trigger.EventName = "Tick";
            e.UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always;
            e.UpdatePanel.Triggers.Add(trigger);
        }
        #endregion
Peeyush
Top achievements
Rank 1
 answered on 08 Jan 2013
2 answers
99 views
I'm trying to use the RadMaskedTextBox. What I need to do is to allow the user to enter 3 different formats.

Below are examples

123

123-456

123-456-789


If he enters 132 then there is nothing different but if he types in 1234 then as soon as he enters 4, I need to display the dash. It is the same for 7. I can't use a validator as I need it on the entry and not when he is validating the page.

I thought about using a mask but I don't want to display the dash when the page loads in case he only types in 3 digits. I thought about a regular expression but I don't know how to implement only when the user is typing and not validating.

Maybe the RadMaskedTextBox is not the right control to use.

Thank you for your help.
Elisabeth
Top achievements
Rank 1
 answered on 08 Jan 2013
4 answers
323 views
I have a RadCombobox where in the first name textbox if I type a letter...it shows me list of users that begin with that letter.

<telerik:RadComboBox Visible="false" Skin="Vista" TabIndex="10" ID="rcbLastName" runat="server"
                                                           AllowCustomText="true" Width="200px" ShowToogleImage="false" EnableOverlay="true" ShowDropDownOnTextboxClick="false" DropDownWidth="200px" MaxLength="20" CausesValidation="false"
                                                           EnableLoadOnDemand="true" EnableScreenBoundaryDetection="false" ExpandDirection="Up" EnableVirtualScrolling="true" ShowMoreResultsBox="true"
                                                           AutoPostBack="True" OnClientItemsRequesting="OnClientItemsRequesting" OnClientDropDownOpening="OnClientDropDownOpening" OnItemsRequested="rcbLastName_ItemsRequested" OnSelectedIndexChanged="rcbBarNumber_SelectedIndexChanged"
                                                           ItemsPerRequest="5">

I have server side code rcbFirstName_itemsrequested that pulls the data out of the db and displays it. 
if (!String.IsNullOrEmpty(e.Text))
            {
                rcbLastName.ClearSelection();
                NameValueCollection nvc = new NameValueCollection();
                nvc.Add("LastName", e.Text);
  
                DataTable accounts = DB.ExecuteDataTable("usp_AccountsGetByLastName", nvc);
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + rcbLastName.ItemsPerRequest, accounts.DefaultView.Count);
                e.EndOfItems = endOffset == accounts.DefaultView.Count;
  
                for (int i = itemOffset; i < endOffset && i < accounts.DefaultView.Count; i++)
                {
                    string data = accounts.DefaultView[i]["FullName"].ToString();
                    if (!String.IsNullOrEmpty(accounts.DefaultView[i]["Address1"].ToString()))
                    {
                        data += " - " + accounts.DefaultView[i]["Address1"].ToString() + " ";
                        if (!String.IsNullOrEmpty(accounts.DefaultView[i]["Address2"].ToString()))
                            data += accounts.DefaultView[i]["Address2"].ToString() + " ";
                        data += accounts.DefaultView[i]["City"].ToString() + " " + accounts.DefaultView[i]["State"].ToString() + " " + accounts.DefaultView[i]["Zip"].ToString();
                    }
                    rcbLastName.Items.Add(new RadComboBoxItem(data, accounts.DefaultView[i]["AccountID"].ToString()));
                }
                if (accounts.DefaultView.Count <= 0)
                    e.Message = "No matches";
                else
                    e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, accounts.DefaultView.Count);
            }

The drop down is working fine. However I do not understand how to get rid of the empty Combo box item if there are no matches. Also, how to get rid of the down arrow if there are no matches. 

What do I need to do if I don't want to show the drop down if there are no matches.

Please advice!

Thanks!
Nencho
Telerik team
 answered on 08 Jan 2013
4 answers
259 views
Hi,

I'm evaluating Telerik RadGrid for our web portal software and therefore created a few prototypes. There is one behavior that strikes me: In a grid configured to allow multiple selections (using GridClientSelectColumn), after deselecting the last item of formerly selected items, the grid's SelectedIndexChanged event doesn't fire on the next postback. Every other change regarding the selection raises the event as anticipated. Is this by design? And if it is, how can I get notified about the selection change?

Thanks,

Andreas
Andreas
Top achievements
Rank 1
 answered on 08 Jan 2013
3 answers
118 views
Happy New Year

I have a RadGrid and RadTreeview controls on a web form. Treeview displays list of documents which user can drop on RadGrid rows. I change the text of one of columns in grid from "Drop Here" to document dropped from the treeview using server side code. 

I would like to place a validation using client side to stop user dropping another document on the same row. To achieve this I was checking for text "Drop Here" in the column where document was dropped and allow if the text is "Drop Here". I always get the text "Drop Here" although the text has been updated.

My ASPX and code behind are as below

Many thanks
GridDataItem dataItem = RadGrid1.MasterTableView.Items[RowNumber.Value];
 
foreach (RadTreeNode node in e.DraggedNodes)
{
    //AddRowToGrid(dt, node);
    dataItem["DocAssigned"].Text = node.Text;
}

<telerik:RadDockZone runat="server" ID="RadDockZone1" Orientation="Vertical" Height="300px" Width="875px" BorderStyle="None">
    <telerik:RadDock runat="server" ID="RadDock1" Title="Vehicle Schedule" Height="300px" Width="875px">
        <ContentTemplate>
            <telerik:RadGrid runat="server" ID="RadGrid1" Width="840px" Visible="true" AutoGenerateColumns="False" OnRowDrop="RadGrid1_RowDrop">
                <MasterTableView Width="100%" DataKeyNames="CompletionDate,DocAssigned"  ClientDataKeyNames="CompletionDate,DocAssigned">
                    <Columns>
                        <telerik:GridBoundColumn
                            UniqueName="CompletionDate" SortExpression="CompletionDate" DataField="CompletionDate"
                            HeaderStyle-Width="85" HeaderText="Completed" DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn
                            UniqueName="DateDue" SortExpression="DateDue" DataField="DateDue"
                            HeaderStyle-Width="85" HeaderText="Due" DataFormatString="{0:dd/MM/yyyy}">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn
                            UniqueName="AgCompanyName" SortExpression="AgCompanyName" DataField="AgCompanyName"
                            HeaderStyle-Width="250" HeaderText="Agent">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn
                            UniqueName="DocName" SortExpression="DocName" DataField="DocName"
                            HeaderStyle-Width="150" HeaderText="Document">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn
                            UniqueName="LinkedTo" SortExpression="LinkedTo" DataField="LinkedTo"
                            HeaderStyle-Width="80" HeaderText="Linked To">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderStyle-Width="80" HeaderText="Doc Assigned" UniqueName="DocAssigned" SortExpression="DocAssigned" DataField="DocAssigned" >
                        </telerik:GridBoundColumn>
                    </Columns>
                    <NoRecordsTemplate>
                        <div style="height: 30px; cursor: pointer;">
                            No outstanding documents for this vehicle
                        </div>
                    </NoRecordsTemplate>
                </MasterTableView>
                <ClientSettings AllowRowsDragDrop="true">
                    <ClientEvents OnRowMouseOver="RowMouseOver" OnRowDragStarted="OnRowDragStarted" />
                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
                </ClientSettings>
            </telerik:RadGrid>
        </ContentTemplate>
    </telerik:RadDock>
</telerik:RadDockZone>
<telerik:RadDockZone runat="server" ID="unprocessedDocumentsRadDockZone" Orientation="Vertical" Height="460px" Width="875px" BorderStyle="None">
    <telerik:RadDock runat="server" ID="unprocessedDocumentsRadDock" Title="Unprocessed Documents" Height="460px" Width="875px">
        <ContentTemplate>
            <table>
                <tr>
                    <td valign="top">
                        <telerik:RadTreeView ID="RadTreeView1" runat="server" AllowNodeEditing="false"  Height="400px" Width="200px" Style="border: 1px solid #CBE7F5;"
                                             EnableDragAndDrop="true"  OnClientNodeClicked="onNodeClicked"
                                             OnNodeDrop="RadTreeView1_HandleDrop"
                                             OnClientNodeDropping="onNodeDropping" OnClientNodeDragging="onTreeViewDragging"
                                             OnNodeExpand="RadTreeView1_NodeExpand">
                        </telerik:RadTreeView>
                     
                    </td>
                    <td valign="top">
                        <pdfviewer:ShowPdf ID="ShowPdf1" runat="server" BorderStyle="None" BorderWidth="0px" Height="400px" Width="680px" />
                     
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </telerik:RadDock>
</telerik:RadDockZone>
Neetu
Top achievements
Rank 1
 answered on 08 Jan 2013
1 answer
65 views
I have implemented a radGrid with a GridDateTimeColumn as follows:
<telerik:RadGrid ID="radGridHistory" AllowCustomPaging="True" AllowFilteringByColumn="True"
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" EnableHeaderContextMenu="true"
    EnableLinqExpressions="False" GridLines="Horizontal" GroupingEnabled="false"
    Visible="false"
    OnItemDataBound="radGridHistory_ItemDataBound" OnInit="radGridHistory_Init" OnNeedDataSource="radGridHistory_NeedDataSource"
    runat="server">
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView DataKeyNames="ID" AllowFilteringByColumn="true" AllowCustomSorting="true" NoMasterRecordsText="No History records to display">
        <Columns>
 
            <telerik:GridDateTimeColumn DataField="EventDate" DataFormatString="{0:MM/dd/yyyy hh:mm tt}"
                EnableRangeFiltering="true" EnableTimeIndependentFiltering="false"
                HeaderText="Date" PickerType="DatePicker" SortExpression="EventDate"
                UniqueName="EventDate">
            </telerik:GridDateTimeColumn>
 
        </Columns>
        <PagerStyle AlwaysVisible="True" />
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
    <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
    <FilterMenu EnableImageSprites="false" />
</telerik:RadGrid>


The filter popup though is missing the "NoFilter", "Between" and "NotBetween" options as shown in the attached jpg.  What am I missing here?  I am running Telerik ASP.NET AJAX version 2012.3.1205.40.
Chad Johnson
Top achievements
Rank 1
 answered on 08 Jan 2013
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
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
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?