Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views

Hi,

I am tring to create a year calendar (multi month) to select, save and restore in a DB multiple sections (periods) and I do not know where to start.  My goal is to setup a banner system where the same banner can be showed for multiple days at different period in a year.

For example: december 2,3,4,5,6 ; january 9,10,11,12,13; etc.

My DB is not structured so I am free to set it up to support the calendar.  The selected dates could be saved in 1 field (comma separated) or in many records (one for each period - start to end).

  1. Is it possible to do it with the calendar control?
  2. Do you have clue, sample, demo, hit to help me to start it correctly?

Thank you

Erik



Radoslav
Telerik team
 answered on 22 Jan 2010
2 answers
552 views

I'm creating several textboxes and dropdown controls.  Some have a related RequiredFieldValidator control.  The RequiredFieldValidator is created as follows:

        RequiredFieldValidator getValidator(string ctrlNo, bool visible, Label lbl, TextBox txt, RadComboBox rcb)
        {
            string lblName = (lbl==null ? "This " : lbl.Text.Replace(" "," "));
            RequiredFieldValidator rfv = new RequiredFieldValidator();
            rfv.ID = "rfv_" + ctrlNo;
            rfv.Visible = visible;
            if (txt.Visible == true)
                rfv.ControlToValidate = txt.ID;
            if (rcb.Visible == true)
                rfv.ControlToValidate = rcb.ID;
            rfv.ErrorMessage = lblName;
            rfv.ToolTip = lblName;
            rfv.Text = "*";
            rfv.ValidationGroup = "cmsave";
            return rfv;
        }

 This method is called from the following section of code which inserts rows into a table.  Insert location is marked with a PlaceHolder control (ID="tblInsertRow").

                // instantiate each control.
                Label lbl = getLabel(ctrlNo, bShowLbl, property.Label);
                TextBox txt = getTextBox(ctrlNo, bShowTxt, property.ControlWidth);
                RadComboBox rcb = getComboBox(ctrlNo, bShowRcb, property.ControlWidth, list);
                RequiredFieldValidator rfv = getValidator(ctrlNo, bShowRfv, lbl, txt, rcb);

                // STEP 2 - ADD CONTROLS TO A ROW

                if (txt.Visible == true || rcb.Visible == true)
                {
                    // create new table row.
                    TableRow row = new TableRow();

                    // create 1st cell; add label; add cell to row.
                    TableCell cell_0 = new TableCell();
                    if (lbl.Visible == true)
                        cell_0.Controls.Add(lbl);
                    cell_0.ColumnSpan = 1;
                    row.Controls.Add(cell_0);

                    // create 2nd cell; add control; add cell to row.
                    TableCell cell_1 = new TableCell();
                    if (txt.Visible == true)
                        cell_1.Controls.Add(txt);
                    if (rcb.Visible == true)
                        cell_1.Controls.Add(rcb);
                    if (rfv.Visible == true)
                        cell_1.Controls.Add(rfv);
                    cell_1.ColumnSpan = 3;
                    row.Controls.Add(cell_1);

                    // add row at place holder into existing table.
                    tblInsertRow.Controls.Add(row);
                }

 

When the user clicks the "Save" button, I force a validation of all validators as follows:

            // force validation of controls.
            Page.Validate("cmsave");

            if (Page.IsValid == false)
            {
                // display message.
                return;
            }

The problem I'm having is that Page.IsValid is always "true".  I read some older posting that stated that you cannot use RequiredFieldValidator with AJAX, but I don't believe that's true anymore since I've done it before with static controls.  This is the 1st time I'm trying to do this with controls created at runtime.  These controls are created in a User Control that is displayed on a Page with a Master Page.  Could this be a RadScriptManager related issue?  What am I missing?  TIA, Gary.

Kalina
Telerik team
 answered on 22 Jan 2010
5 answers
790 views
Hello Telerik Team,

I'm developing my web-app based on RadTabStrip/MultiPage load on demand pageviews. I was happy with the end-result until I realised that each time I click a tab, ALL the pageviews are reloaded, which means ALL the User Controls are reloaded too, which is not good!

Also, I can't use the RenderSelectedPageOnly option on MultiPage cause I cancel ajax requests for tabs whose corresponding pageviews have been loaded.

So, the desired behavior is :

1) Load the user controls on demand, so I can navigate through them without doing unnecessary postback.

2) When I click on a tab which is not already loaded, I just want his appropriate pageview loaded, keeping the others pageviews unaffected.

Is it possible to do that? If so, How can I modify your online demo to achieve the desired behavior?

Thanks in advance!

Pierre-Luc
Yana
Telerik team
 answered on 22 Jan 2010
2 answers
140 views
Hi,
I'm localizing the RadUpload control at the server side - for example:
      theUpload.Localization.Select = "Wybierz plik";
The text changes as required but while under FF and Opera it looks perfect (see attached unpload_ok.jpg), under IE7/8, Chrome and Safari the caption is shifted to the right and truncated (see upload_bad.jpg).
Whats can I do to improve the look under these browsers?

Regards
Tomasz
Tomasz M.Lipiński
Top achievements
Rank 1
 answered on 22 Jan 2010
1 answer
76 views
The "Description" tab on this page suggests that the Command for the TimeSlotContextMenu to Add A Recurring Appointment is "AddRecurringAppointment", but the marup on the "DefaultCS.aspx" tab reads ...
<telerik:RadMenuItem Text="New Recurring Appointment" ImageUrl="Images/recurring.gif" Value="CommandAddRecurringAppointment" /> 
I'm guessing that the "Description" tab is wrong.

--
Stuart
Peter
Telerik team
 answered on 22 Jan 2010
5 answers
707 views

I'm using trial Q2 2009 controls with a RadNumericTextBox input for salary and have several issues:-
 

 
<telerik:RadNumericTextBox runat="server" ID="dataEarnedAnnualIncome" Text='<%# Bind("EarnedAnnualIncome") %>' NumberFormat-DecimalDigits="0" NumberFormat-AllowRounding="true" Tooltip="" /> 

 

 

 

 

 

1. I don't want any decimal places, however, no matter what I do the control allows me to enter several decimal places. I need the control to stop me enetring decimal places or limit it to the correct number like a masked control - how can I do this?

I've tried adding a OnClientBlur javascript function to disable the decimal point from input, which would only cater for numbers with no decimal places, but this doesn't work as none of the RadNumericTextBox validation then happens and I can enter non numeric text in the box - can my script be changed to make this work?
 

 
//Function to stop decimal point being input  
        function StripDecimalPoint(sender, eventArgs) {  
            var c = eventArgs.get_keyCode();  
            if (c == 46) { eventArgs._cancel = true; }  
            return false;  
        } 

 

 


2. The rounding is calculated incorrectly as rounding depends on the number of significant decimal places not just the values of the numbers. With no decimal places 0.45 should be rounded down to 0, however it is being rounded up to 1?

3. If I cannot limit the number of decimals the user inputs then its preferable to truncate the input, however, when I change the AllowRounding to false the input is not truncated but left exactly as entered by the user. Obvioulsy I'd prefer to stop the user being able to enter extra decimals but if I can't how do I need to change my line to get truncating to work?

If these are known issue when do you anticipate fixing them?

Thanks

 

Dimo
Telerik team
 answered on 22 Jan 2010
1 answer
95 views
Working with RadTreeView file version 6.3.6.0. 

I'm using server-side LoadOnDemand; It loads the 1st level fine and the server side NodeClick event is firing.
Expanding a node fires the NodeExpand where I add the next level of data.
    Private Sub AddChildNodes(ByVal node As RadTreeNode) 
        If GetCustomersByNode(CInt(node.Value)) Then 
            Dim row As DataRow 
            For Each row In parentCustomer.Tables(0).Rows 
                Dim childNode As New RadTreeNode() 
                childNode.Text = CStr(row("CustomerName")) 
                childNode.Value = CInt(row("CustomerNum")).ToString() 
                childNode.ExpandMode = CInt(row("HasChild")) 
                childNode.PostBack = True 
                node.Nodes.Add(childNode) 
            Next row 
        End If 
    End Sub 

When I click on any node level which has been populated via NodeExpand event, it does not perform the server side NodeClick event.
What can I do to get the server-side event to fire when I click the node?  I've seen a suggestion to use the RadAjaxManager (which I am using for other controls in this page), but I'm not sure how to wire that up.

Thanks,
Jim
Yana
Telerik team
 answered on 22 Jan 2010
1 answer
75 views
Actually for a normal aspx page the custom colors are applying to raddocks,but when my page is inherting a masterpage it is not working.


thanks in advance
Pero
Telerik team
 answered on 22 Jan 2010
2 answers
116 views
Hi,
    I am using the following code to open a radWindow from another radWindow:

  function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function openRadWin(accid, grporhd, contmenutxt)
        {
            var oManager = GetRadWindow().get_windowManager();
            oManager.open('/Demo/frmAccount.aspx?id=' + accid + '&grporhd=' + grporhd + '&contmenu=' + contmenutxt, "RadWindow2");
        }       

I am calling openRadWin() on the click event of a button in the parent radWindow ( code given below ) to call the second radWindow (ie. RadWindow2)

I am using the following code to open the parent radWindow:
 
            RadWindow newWindow = new RadWindow();
            newWindow.Title = "Chart of Account";
            newWindow.Skin = "Forest";
            newWindow.NavigateUrl = "~/ChartOfAccountTest.aspx";
            newWindow.Top = Unit.Pixel(50);
            newWindow.VisibleOnPageLoad = true;
            newWindow.Behaviors = WindowBehaviors.Move | WindowBehaviors.Close | WindowBehaviors.Minimize | WindowBehaviors.Reload;
            newWindow.Left = Unit.Pixel(200);
            newWindow.Width = Unit.Pixel(650);
            newWindow.Height = Unit.Pixel(500);
            RadWindowManager1.Windows.Add(newWindow);

The javascript given in the beginning is put in the script section of ChartOfAccountTest.aspx .  I want to raise an event of CharOfAccountTest.aspx when the second radWindow (ie. RadWindow2) is closed.  Please suggest me a solution to implement this. Any help will be highly appreciated.

Joseph

Joseph Ambattu
Top achievements
Rank 1
 answered on 22 Jan 2010
3 answers
240 views
I copied "Vista" skin directory.
I modified name example: Ajax.Vista.css -> Ajax.SESkin.css
I modified name all css class example: .RadAjax_Vista -> .RadAjax_SESkin
( http://www.telerik.com/help/aspnet-ajax/themeshowto.html )
I copied this my directory SESkin in App_Theme\SETheme
I created SESkin.skin in App_Theme\SETheme:

 

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<telerik:RadCalendar runat="server"   
                     EnableEmbeddedSkins="false"   
                     Skin="SESkin" /> 
                       
<telerik:RadChart runat="server"   
                  EnableEmbeddedSkins="false"   
                  Skin="SESkin" /> 
                    
<telerik:RadColorPicker runat="server"   
                        EnableEmbeddedSkins="false"   
                        Skin="SESkin" /> 
                          
<telerik:RadComboBox runat="server"   
                     EnableEmbeddedSkins="false"   
                     Skin="SESkin" /> 
                       
<telerik:RadDock runat="server"   
                 EnableEmbeddedSkins="false"   
                 Skin="SESkin" /> 
                   
<telerik:RadDatePicker runat="server"   
                       EnableEmbeddedSkins="false"   
                       Skin="SESkin" /> 
                         
<telerik:RadGrid runat="server"   
                 EnableEmbeddedSkins="false"   
                 Skin="SESkin"   
                 EnableLinqExpressions="false" 
                 GroupingSettings-CaseSensitive="false" />   
 
 
                   
<telerik:RadEditor runat="server"   
                   EnableEmbeddedSkins="false"   
                   Skin="SESkin" /> 
                     
<telerik:RadFileExplorer runat="server"   
                         EnableEmbeddedSkins="false"   
                         Skin="SESkin" /> 
                           
<telerik:RadFormDecorator runat="server"   
                          EnableEmbeddedSkins="false"   
                          Skin="SESkin" /> 
                            
<telerik:RadMaskedTextBox runat="server"   
                          EnableEmbeddedSkins="false"   
                          Skin="SESkin" /> 
                            
<telerik:RadMenu runat="server"   
                 EnableEmbeddedSkins="false"   
                 Skin="SESkin" /> 
                   
<telerik:RadTextBox runat="server"   
                    EnableEmbeddedSkins="false"   
                    Skin="SESkin" /> 
                      
<telerik:RadDateInput runat="server"   
                      EnableEmbeddedSkins="false"   
                      Skin="SESkin" /> 
                        
<telerik:RadPanelBar runat="server"   
                     EnableEmbeddedSkins="false"   
                     Skin="SESkin" /> 
                       
<telerik:RadProgressArea runat="server"   
                         EnableEmbeddedSkins="false"   
                         Skin="SESkin" /> 
                           
<telerik:RadRotator runat="server"   
                    EnableEmbeddedSkins="false"   
                    Skin="SESkin" /> 
                      
<telerik:RadScheduler runat="server"   
                      EnableEmbeddedSkins="false"   
                      Skin="SESkin" /> 
                        
<telerik:RadSlider runat="server"   
                   EnableEmbeddedSkins="false"   
                   Skin="SESkin" /> 
                     
<telerik:RadSpell runat="server"   
                  EnableEmbeddedSkins="false"   
                  Skin="SESkin" /> 
                    
<telerik:RadSplitter runat="server"   
                     EnableEmbeddedSkins="false"   
                     Skin="SESkin" /> 
                       
<telerik:RadTabStrip runat="server"   
                     EnableEmbeddedSkins="false"   
                     Skin="SESkin" /> 
                       
<telerik:RadToolBar runat="server"   
                    EnableEmbeddedSkins="false"   
                    Skin="SESkin" /> 
                      
<telerik:RadToolTip runat="server"   
                    EnableEmbeddedSkins="false"   
                    Skin="SESkin" /> 
                      
<telerik:RadTreeView runat="server"   
                     EnableEmbeddedSkins="false"   
                     Skin="SESkin" /> 
                       
<telerik:RadUpload runat="server"   
                   EnableEmbeddedSkins="false"   
                   Skin="SESkin" /> 
                     
<telerik:RadWindow runat="server"   
                   EnableEmbeddedSkins="false"   
                   Skin="SESkin" /> 
                     
<telerik:RadWindowManager runat="server"   
                          EnableEmbeddedSkins="false"   
                          Skin="SESkin" /> 

In my page set this Theme.

It's all ok but It's impossibile view edit-icon, delete-icon, cancel-icon etc.
But refresh-icon anche Add-icon are ok!

Dimo
Telerik team
 answered on 22 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?