Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
187 views
Hi there,

i have a calendar for which i have added a number of repeatable special days (mon - fri), after adding these i add some other specific special dates.

However, the calendar is not rendered properly.

Firstly, the tooltips of the repeatable days are only shown in the current month view. If you change the month, all tooltips are lost for repeatable days. When returning to the current, only tooltips are shown for the first week, not the other weeks. I find this strange and unlogic behaviour.

Secondly, some days are shown differently in the initial month view after having navigated to another month. Also the days (weekends) that i have changed the background to red, are not shown in the initial month view, but they are shown red after i have changed months.

Thirdly, it seems that on initial month view on one day the standard repeatable day is shown over the specific exception day, and on another day in that month it is just the other way around, the specific exception day is shown over the standard repeatable day.

please see attached files, please advise on how to get my calendar showing proper exception days.

thanks in advance!

How do I make sure that the special days overrule the repeatable days? Or, what logic is used in rendering special days in the calendar?

Here's my code:

 

protected void calAfleverDatum_PreRender(object sender, EventArgs e)  
        {  
            DateTime myDate = DateTime.Today;  
            string sToolTip;              
 
            //-- Set Exception Days --  
            foreach (DeliveryCalendar_Exception myException in lCal_Exception)  
            {  
                RadCalendarDay myDay = new RadCalendarDay();  
 
                myDay.Date = myException.ExceptionDate;  
                myDay.IsSelectable = myException.IsDeliveryDay;  
                myDay.IsDisabled = !myException.IsDeliveryDay;  
 
                if (myException.IsDeliveryDay)  
                    myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#a2d4a2");  
                else 
                    myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#e4a2a4");  
 
                sToolTip = myDate.ToString("dddd, MMMM d, yyyy");  
 
                if (myException.Description.Length > 0) sToolTip += "\n\n" + myException.Description;  
 
                if (myException.TimeFrom != null && myException.TimeTo != null)  
                    sToolTip += "\n\nVan:  " + myException.TimeFrom.Value.ToShortTimeString() + "    Tot: " + myException.TimeTo.Value.ToShortTimeString();  
 
                myDay.ToolTip = sToolTip;  
 
                rdpAfleverDatum.Calendar.SpecialDays.Add(myDay);  
            }  
 
            //-- Set Standard Days --  
            while (myDate.DayOfWeek != DayOfWeek.Monday) myDate = myDate.AddDays(1);  
 
            foreach (DeliveryCalendar_Standard myStandard in lCal_Standard)  
            {  
                RadCalendarDay myDay = new RadCalendarDay();  
 
                myDay.Date = myDate;  
                myDay.IsSelectable = myStandard.IsDeliveryDay;  
                myDay.IsDisabled = !myStandard.IsDeliveryDay;  
                myDay.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.Week;  
 
                if (myStandard.IsDeliveryDay)  
                    myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#a2d4a2");  
                else 
                    myDay.ItemStyle.BackColor = System.Drawing.ColorTranslator.FromHtml("#e4a2a4");  
 
                sToolTip = myDate.ToString("dddd, MMMM d, yyyy");  
 
                if (myStandard.TimeFrom != null && myStandard.TimeTo != null)  
                    sToolTip += "\n\nVan:  " + myStandard.TimeFrom.Value.ToShortTimeString() + "    Tot: " + myStandard.TimeTo.Value.ToShortTimeString();  
 
                myDay.ToolTip = sToolTip;  
 
                rdpAfleverDatum.Calendar.SpecialDays.Add(myDay);  
 
                myDate = myDate.AddDays(1);  
            }  
        } 

Iana Tsolova
Telerik team
 answered on 17 Jun 2010
1 answer
90 views
Hi,

I've been problems in get checkbox from header of radgrid, and I dont know know to obtain this control. I need to access this control because When the user disable a check box from a row, then I need to access the checkbox all to set its checked property by false.

ex: checkboxSelectAll.checked = false;

Could Anybody help me, please?

Thak you for all attention,

Carlos
Shinu
Top achievements
Rank 2
 answered on 17 Jun 2010
2 answers
131 views
Hi,

Is there any way to use the RadTextbox as a Filtered Textbox (like AJAXCONTROLTOOLKIT) where we can define the valid characters of input?

Thanks

Andy Ho
Andy Ho
Top achievements
Rank 1
 answered on 17 Jun 2010
7 answers
462 views
Pretty basic issue - just trying to retrieve the selected value of a RadComboBox on server-side.  Naturally my instinct was to try the SelectedValue but that returns "".  After doing some research through this forum I kind of understand why that is -- it's a client-side thing because of the LoadOnDemand and so the server knows nothing about the selected value.

After some more digging it seemed that the common response to this was to use the "Text" and "Value" properties of the combobox.  The Text property is available and works just fine, however I couldn't find a Value property which was driving me batty.

Eventually I found another thread that indicated the Value should be used on the "Items".  So I tried MyComboBox.Items(0).Value but I got an "Index out of range" error.

Can someone kindly clear up this issue for me?  Thanks!
iTools
Top achievements
Rank 1
 answered on 17 Jun 2010
2 answers
273 views
I am currently enabling and disabling my radtoolbar commanditems (for my radgrid) on the serverside with the following code. This is working fine but requires a postback to the server which is too slow (2 secs before buttons update).

Serverside code (VB):
    Protected Sub radGrid_Cases_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) 
        For Each cmdItem As GridCommandItem In radGrid_Cases.MasterTableView.GetItems(GridItemType.CommandItem) 
            Dim rdtlbr As RadToolBar = DirectCast(cmdItem.FindControl("rtb_Commands"), RadToolBar) 
            rdtlbr.FindItemByText("Edit Case").Enabled = True 
            rdtlbr.FindItemByText("Delete Case").Enabled = True 
            rdtlbr.FindItemByText("Print Case").Enabled = True 
            rdtlbr.FindItemByText("Email Case").Enabled = True 
            rdtlbr.FindItemByText("Edit Payments").Enabled = True 
        Next 
    End Sub 
 
    Public Sub DisableGridCommandButtons() 
        For Each cmdItem As GridCommandItem In radGrid_Cases.MasterTableView.GetItems(GridItemType.CommandItem) 
            Dim rdtlbr As RadToolBar = DirectCast(cmdItem.FindControl("rtb_Commands"), RadToolBar) 
            rdtlbr.FindItemByText("Edit Case").Enabled = False 
            rdtlbr.FindItemByText("Delete Case").Enabled = False 
            rdtlbr.FindItemByText("Print Case").Enabled = False 
            rdtlbr.FindItemByText("Email Case").Enabled = False 
            rdtlbr.FindItemByText("Edit Payments").Enabled = False 
        Next 
    End Sub 
 

I have been trying to change this over to be done on the client side (in the rowselected event) instead to make it more responsive, but I have been unable to find a clientside method of accessing these buttons as they are nested inside the radgrid commanditem toolbar.


GlenB
Top achievements
Rank 1
 answered on 16 Jun 2010
5 answers
1.2K+ views
When do I need to set a value for ClientDataKeyNames? Should this value generally be set to the same values of DataKeyNames?
Cindy Wang
Top achievements
Rank 1
 answered on 16 Jun 2010
2 answers
1.1K+ views
keep getting:

Invalid attempt to call FieldCount when reader is closed.

calling rlv.Rebind() on page load.

<telerik:RadListView ID="rlv" OnNeedDataSource="rlv_NeedDataSource" ItemPlaceholderID="ProductItemContainer" runat="server"> 
            <LayoutTemplate> 
             
                <fieldset> 
                    <legend>Parent Contacts</legend> 
                    <table cellpadding="0" cellspacing="0" class="tblDisplay" width="auto"> 
                    <tr> 
                        <td>Name</td> 
                        <td>Relation</td> 
                        <td>Phone</td> 
                        <td>Work #</td> 
                        <td>Cell #</td> 
                    </tr> 
                    <asp:PlaceHolder ID="ProductItemContainer" runat="server" /> 
                    </table> 
                </fieldset> 
            </LayoutTemplate>             
             <ItemTemplate> 
                 <tr> 
                    <td><%#DataBinder.Eval(Container.DataItem, "FullName")%>"</td> 
                    <td><%#DataBinder.Eval(Container.DataItem, "RelationDesc")%>"</td> 
                    <td><%#DataBinder.Eval(Container.DataItem, "Phone")%>"</td> 
                    <td><%#DataBinder.Eval(Container.DataItem, "WorkPhone")%>"</td> 
                    <td><%#DataBinder.Eval(Container.DataItem, "CellPhone")%>"</td> 
                 </tr> 
            </ItemTemplate>             
            </telerik:RadListView> 

.List() below returns a datareader.
        Protected Sub rlv_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewNeedDataSourceEventArgs) Handles rlv.NeedDataSource 
 
            Dim sqlDR As SqlDataReader 
            sqlDR = ObjectTest.List() 
            rlv.DataSource = sqlDR 
        End Sub 





Paul J
Top achievements
Rank 1
 answered on 16 Jun 2010
7 answers
144 views
I've got this error message Unknown server tag 'radP:RadPanelBar'  Then I have found this link  http://www.telerik.com/community/forums/aspnet-ajax/panelbar/unknown-server-tag-telerik-radpanelbar.aspx for this saying that 2008 version is needed for RadPanelBar. but I have Q 2007 RadControls version..  First of all, is this really true that I need to have this version otherwise with 2007 it doesnt work? Is that anyway I can download this for free since I have 2007 version?
One thing makes me confused though if I really need to have 2008 version , why under the folder Q 2007 RadControls , RadPanelBar dll and documents etc comes with it, that's why I automatically thought that I am ok to use Radpanelbar... Please advice!!
jaws1021
Top achievements
Rank 1
 answered on 16 Jun 2010
4 answers
125 views
I am doing a cross-page post using something similar to this...

Dim

 

amount As RadNumericTextBox = Me.PreviousPage.FindControl("txAmount")

 


If the end-user types in an amount, such as 12.50 on the original page, the cross page post will drop the 0.

How can i retain the zero buring a cross-page post?
Patrick Wilson
Top achievements
Rank 1
 answered on 16 Jun 2010
11 answers
284 views
Hello,

It seems the latest version of the telerik controls has an in-built loading panel, which is very nice...  but I was wondering if each control now has an API to show or hide that loading panel?  Is that a CSS thing, or something else?

Thanks.
Brian Mains
Top achievements
Rank 1
 answered on 16 Jun 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?