Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
1.6K+ views
How to disable days in RadDatePicker?
If I google to find, everyone is referring to article which doesn't work in vs2013.
http://www.telerik.com/support/code-library/disabling-calendar-days

I also tried to do with following functions but it only disables like 10 total weekends.  It doesn't disable any previous months weekends. Any suggestions!
    Protected Sub Calendar_OnDayRender(ByVal sender As Object, ByVal e As Telerik.Web.UI.Calendar.DayRenderEventArgs)
        If (e.Day.Date.DayOfWeek = DayOfWeek.Saturday Or e.Day.Date.DayOfWeek = DayOfWeek.Sunday) Then     
            ' disable the selection for the specific day
            Dim calendarDay As RadCalendarDay = New RadCalendarDay
            calendarDay.Date = e.Day.Date
            calendarDay.IsSelectable = False
            calendarDay.IsDisabled = True
            'calendarDay.ItemStyle.CssClass = otherMonthCssClass
            calendarDay.ItemStyle.BackColor = Color.CadetBlue
            RadDatePicker1.Calendar.SpecialDays.Add(calendarDay)
        End If    End Sub
Viktor Tachev
Telerik team
 answered on 04 Apr 2014
1 answer
68 views
We are mainly using RADGrid Telerik control in our site. But we are facing many difficulties in it when Compatibility View of IE9 changes such as column of the grid get shrink, footer row stop working, dropdown autopostback doesn’t respond, textbox size changes on mouse over, page sizing error, page changed error and many more. Will you please help me to resolve this problem? Is there any compatibility issues with RADGrid or we are going somewhat in different direction.
Galin
Telerik team
 answered on 04 Apr 2014
14 answers
645 views
I have a custom user control that I use within a Master Page.  The user control has a mix of Telerik and asp.net controls.  I am using an Ajax manager on the Master Page with a Proxy on the user control.  Everything updates fine but 2 of my Label controls loose there formatting when they are "Ajaxified".  Removing the Ajax manager from the Master page immediately restores the formatting, but of course the Proxy won't work without the manager.  Placing the manager directly in the user control has the same effect.

Basically I am using the label controls as tokens and I need them to remain inline. e.g.  Hello<asp:Label> NOT
Hello
<asp:Label>

Here is some sample code.  I shortened it for brevity as my user control has lots of fields and panels (a survey type user control).
FYI.  This is all being done in a Sitefinity site.

MasterPage
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SingleCenterColumn.master.cs" 
    Inherits="App_Master_SingleCenterColumn" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <div id="wrapper"
        <form id="form2" runat="server"
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="AjaxManager1" runat="server"
        </telerik:RadAjaxManager> 
        <div id="centerwrapper"
            <div id="header" class="borders"> ...
UserControl.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NeedsSurvey.ascx.cs" Inherits="NeedsSurvey_NeedsSurvey" 
    ClassName="NeedSurvey" %> 
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="Button1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="percentage" /> 
                <telerik:AjaxUpdatedControl ControlID="number" /> 
                <telerik:AjaxUpdatedControl ControlID="panel1" /> 
                <telerik:AjaxUpdatedControl ControlID="panel2" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
</telerik:RadAjaxLoadingPanel> 
<h1> 
    Needs Assessment Survey</h1> 
<div id="slider"
    <asp:Label ID="percentage" runat="server" Text="0"></asp:Label>% Complete. Question 
    <asp:Label ID="number" runat="server" Text="0"></asp:Label>&nbsp;of 12 Completed. 
    <telerik:RadSlider ID="RadSlider1" runat="server"
    </telerik:RadSlider> 
</div> 
<asp:Panel runat="server" ID="panel1"
    1. Which of the following best describes the personal needs you feel are the most 
    immediate? 
    <br /> 
    <br /> 
    <asp:RadioButtonList ID="RadioButtonList1" runat="server"
        <asp:ListItem>Help with everday expenses</asp:ListItem> 
        <asp:ListItem>Paying off debt</asp:ListItem> 
        <asp:ListItem>Taking a vacation</asp:ListItem> 
        <asp:ListItem>Home improvements</asp:ListItem> 
        <asp:ListItem>Better medical coverage</asp:ListItem> 
    </asp:RadioButtonList> 
    <br /> 
    <asp:Button ID="Button1" runat="server" OnClick="btn_Click1" /> 
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadioButtonList2" 
        ErrorMessage="Please select an answer"></asp:RequiredFieldValidator> 
</asp:Panel>... 
On each button click the code behind updates the visibility of the current and next panel, updates the label control, and changes the status of a slider (like a progress bar).
CodeBehind ascx.cs
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Net.Mail; 
using System.Net.Mime; 
using System.Reflection; 
using System.Collections.Specialized; 
 
 
public partial class NeedsSurvey_NeedsSurvey : System.Web.UI.UserControl 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        
    } 
 
    #region EventHandlers 
 
   protected void btn_Click1(object sender, EventArgs e) 
    { 
        panel1.Visible = false
        panel2.Visible = true
        RadSlider1.Value = 1; 
        percentage.Text = "8"
        number.Text = "1"
    } 
    protected void btn_Click2(object sender, EventArgs e) 
    { 
        panel2.Visible = false
        panel3.Visible = true
        RadSlider1.Value = 2
        percentage.Text = "16"
        number.Text = "2"
    }... 
CSS
#centercolumn 
    width: 900px; 
    margin-top: 25px; 
    margin-left: auto; 
    margin-right: auto; 
    padding: 10px 25px 25px 25px; 
    background-color: #fff; 
    color: #000; 
#slider 
    width: 300px; 
    margin: 0 auto; 
It would be great if after all of this someone pointed out a CSS problem, but I don't think thats it.  Remove AJax and everything formats properly.  What is interesting is that when Ajax is used the controls in question stack exactly as they are displayed in the Ajax Tree.

???
Thanks.
Joe
Venelin
Telerik team
 answered on 04 Apr 2014
3 answers
83 views
Currently, I'm using the grouping headers (grid header item) as a rollup for values (double) when the data is grouped, by summing the data and manually adding it to the group header item cell.

What I'm seeing is that when the user clicks to sort the column, it is sorting the item values within the groups, but is not sorting the actual groups.

For example:

Name        Team    Year1 Year2 Year3
John                        30        50        40
                    Red     20        30        10
                    Blue    10        20        30
Jane                        100      50        70
                    Red     60        10        30
                    Blue    40        40        40

If I were to sort by Year1 Desc, I would expect Jane to be first and John to be second.

Does anyone know how to sort the groups as well as the items?

Thanks in advance.
Konstantin Dikov
Telerik team
 answered on 04 Apr 2014
4 answers
86 views
I have a grid and within your GridTemplateColumn have a RadNumericTextBox that can be edited. The problem that when I edit a field and press TAB (to go below the line), the value was 1459,14 145914,00 is if I go back into the field above to change the value of the first line, the second line changes again and is 14591400,00 . 
I have attached an example with fictitious data in a list.

Put the DLLs in the file in the bin folder, I removed because the file was too large, making it impossible to upload.

Version: UI for ASP.NET AJAX Q3 2013

Change the extension from. Jpg to. Rar
Kostadin
Telerik team
 answered on 04 Apr 2014
4 answers
125 views
Hi Telerik Team,

I have a problem with Rad Editor control. When changing browser mode:  IE9  and Document Mode:  IE9 standards ONLY. Many of the elements  get stuck vertically - you cannot move them DOWN.  This has happened with file list, image and even with plain text.   
I have tried in telerik domo in this url also (http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx)  but got same problem.

Please, find the attached Screen shot of my issues and If you have any solution/suggestion for this problem then help me out. I need to implement this functionality as soon as possible.

Thanks in Advance

Regards
Saket
Ianko
Telerik team
 answered on 04 Apr 2014
1 answer
120 views
Hi,

We encountered a problem where the RadEditor does not generate the font-family: Arial into the HTML code. Because we offer branded websites to out clients, we often override the default font-family in our .css file (for the body tag mainly). But then, when opening the editor for creating custom sites, the font family selector dropdown is always set to Arial (no matter what and in what order we add to the Tools.xml).
First question is, is there a way, to set the which Font is the default one in the dropdown?
Second problem is, that the editor does not add the font-family: Arial to the Custom HTML content, because it thinks that Arial is the default one on the site, even thought it will be overriten by our custom CSS. It looks really silly, that in the editor, it says the font family is Arial, but on the site, it appears as something different.
Is there a solution to this?

In short:
1. Can I create a Font selector dropdown like this in RadEditor:
           Default Font Type <-- Selected by default, does not add any font-family tag to the custom HTML
           Arial
          Courier New
          ....

2. The RadEditor thinks Arial is the default font family, thus not applying the font-family: Arial when selected. 


Ianko
Telerik team
 answered on 04 Apr 2014
1 answer
46 views
I have a question. Is it possible that Radwindow is still showing even though the Main page is closed?
Thanks, need answer ASAP :) 
Princy
Top achievements
Rank 2
 answered on 04 Apr 2014
1 answer
121 views
I have a radmenu on my page and it is working fine. But the problem is any control that I put on the page goes behind the radmenu, means radmenu comes in front of that control. Please see the attachment:
Shinu
Top achievements
Rank 2
 answered on 04 Apr 2014
6 answers
159 views
Hello Telerik,

So far we have been having a difficult time developing the RadTreeView using server-side coding and data. We have a single table with 3 fields that help define the tree/levels and our internal structure for the application. We want the TreeView to be only postbacked with AJAX on a button click. The TreeView should send back all nodes to the code, which includes new/renamed/reorder nodes. The 3 fields are

NodeLevel - this starts at 1 and ends and the last node in the tree (just a counter of all the node entries - in order of the tree node collection)
NodeLevelUnder - this is a parent to the node - points to the NodeLevel field number
NodeLevelDepth - this is the depth of the node - level deep

Data (NodeLevel, ..Under, ...Depth):
Fruit 1, 0, 0
    Apples 2, 1, 1
        Granny Smith 3, 2, 2
        Greenish Hue 4, 2, 2
    Bananas 5, 1, 1
        Dole 6, 5, 2
            Hawaii 7, 6, 3
            Brazil 8, 6, 3
        Frozen 9, 5, 2
Veggies 10, 0, 0
    Lettuce 11, 10, 1
    Peas 12, 10, 1
        Sugar Snap 13, 12, 2
        Green Pod 14, 12, 2

Well good news is we can get most of this edited nodes, levels, but not the parents id. Using "ClientOperation" of the RadTreeNode in the TreeNode.ClientChanges we can not determine who the parent is of a node that has been added. The GetAllNodes() collecton DOES NOT include the new nodes in the count. We have no idea where it has been added or added and moved. If a old node has a new Parent we need to get that LevelId and put it in the NodeLevelUnder field. The same with a new node that is under a new parent, the index will not reflect the total indexes in the Tree itself, because they are not included in the GetAllNodes() count.

Are we really out of luck trying to accomplish this on the server-side coding? We went through your example here:
http://www.telerik.com/help/aspnet-ajax/treeview-server-save-made-changes-to-treeview-to-database.html
...but you know it really doesnt show real helpful example. It doesnt explain the track/commit at all and really who is just editing node text and reording them, deleting and adding are key features  that should have more attention, at least from our stand point.

Please tell me there is a way to accomplish getting the RadTree back as a whole and iterate through ALL nodes as they appear on the web page? If we cant, then we are defaulted to use custom attributes on the cilent-side for all the user changes and persist them back to the server-side. Will this work? We would have to change out our server-side code and fill in the 3 custom attributes, everytime the client reorders, add, edits, etc., or maybe jsut fill them in once when they click the button to save.

Thanks for the help here
SDI


jlj30
Top achievements
Rank 2
 answered on 04 Apr 2014
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?