Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
114 views
Hi,

I am using Rad Scheduler to show the appointment on daily basis. What i want is, that if there is no appointment for a particular slot then that slot should not be created.
for example i have this on datatable  
9:00 Am to 10:00 Am | Do something
10:00 Am to 11:00 Am | Do nothing
and then
1:00 Pm to 2:00 Pm | Do something Again

so what i did, i have set 9:00 Am as start time and 2:00 Pm as end time
it had also created time slot for 11:00 to 12:00 and 12:00 to 1:00 which are not in Datatable.

i did tried 
 if (e.TimeSlot.Appointments.Count < 1)
        {
            e.TimeSlot.Control.Visible = false;
          }
but still i can see hours on Hours Column and blank space in between the time slot.
is there any way i can stop the time slot from creating or create timeslot according to slot's in Datatable.
Please help.
Thanks 
Prashant Rawat
 
Plamen
Telerik team
 answered on 09 Mar 2012
1 answer
54 views
maybe through vsto
Slav
Telerik team
 answered on 09 Mar 2012
1 answer
219 views
I have the following setup as shown in the markup below. There is an ajaxified panel which contains an imagebutton and a hyperlink. Clicking on either of these opens a rad Window, which has a close handler. The close handler initiates the "click" event of a hidden button in order for me to be able to run some server-side code after the window closes. When I open the radwindow using the hyperlink, everything works as expected. When I do so using the image button, I get the following non-descript javascript error when the hidden button .click event is raised.

Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 405

This error doesn not occur if I don't ajaxify the panel.

I have tried to research this error and track down the cause, but to no avail. When I look at this in Fiddler, I notice the URL that fiddler errors on is .{my path}/javascript:void(0);. I don't know where the javascript:void(0); comes from... but I obviously include that in the Imagebutton PostbackUrl to prevent a postback when the imagebutton is clicked. I also don't know why this piece of the imagebutton declaration would have anything to do with this since the error occurs on the attempt to raise the hidden button's click event.

Any Idea why the image button implementation wouldn't work, while the hyperlink does?

Markup:

<telerik:RadCodeBlock ID="rcb1" runat="server">
          
        <script language="javascript">
  
            function OpenDialog() {
                var oWin = radopen('http://www.yahoo.com', ''); 
                oWin.add_close(Refresh);            
             }
  
            function Refresh() {
                $get('<%= tiReloader.ClientID %>').click();
            }
              
  
        </script>
  
    </telerik:RadCodeBlock>
      
<asp:ScriptManager ID="MyScriptManager" runat="server" AsyncPostBackTimeout="7200"></asp:ScriptManager>
<telerik:RadAjaxLoadingPanel id="lpGlobal" Runat="server" Transparency="18" CssClass="AjaxLoadingProgress"></telerik:RadAjaxLoadingPanel>
<asp:Panel id="pnlT" runat="Server" height="400px">
    <asp:Button ID="tiReloader" runat="server" Text="Button" style="display:none;" />
    <asp:ImageButton id="ib" runat="Server" ImageUrl="~/global/images/icons/edit.png" AlternateText="Open Dialog from Image Button" ImageAlign="AbsMiddle" PostBackUrl="javascript:void(0);" OnClientClick="OpenDialog()" /><br/><br/>
    <asp:Hyperlink id="hl" runat="Server" target="_self" navigateurl="javascript:OpenDialog();" >Open Dialog from Hyperlink</asp:Hyperlink>
</asp:Panel>


In code-behind, I ajaxify the panel using an ajaxmanager which is part of my page base class:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        SetAjaxManagerSettings()
    End Sub
  
    Private Sub SetAjaxManagerSettings()
        Me.AddAjaxSetting(pnlT, pnlT, lpGlobal, Unit.Percentage(100), Web.UI.UpdatePanelRenderMode.Block )
    End Sub
  
    Private Sub tiReloader_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles tiReloader.Click
        Threading.Thread.Sleep(500)
    End Sub
  
Public Sub AddAjaxSetting(ByVal initiatorControl As Control, ByVal updatedControl As Control, ByVal loadingPanel As RadAjaxLoadingPanel, ByVal updatePanelHeight As Unit, ByVal updatePanelRenderMode As UpdatePanelRenderMode)
  
            Dim ajaxManager As RadAjaxManager = Telerik.Web.UI.RadAjaxManager.GetCurrent(Me)
  
            If ajaxManager IsNot Nothing Then
  
                If initiatorControl IsNot Nothing And updatedControl IsNot Nothing Then
  
                    Dim setting As AjaxSetting = New AjaxSetting
  
                    ajaxManager.AjaxSettings.Add(setting)
  
                    setting.AjaxControlID = initiatorControl.ID
  
                    Dim ajxUpdatedControl As New AjaxUpdatedControl()
  
                    ajxUpdatedControl.ControlID = updatedControl.ID
  
                    If loadingPanel IsNot Nothing Then
  
                        ajxUpdatedControl.LoadingPanelID = loadingPanel.ID
  
                    End If
  
                    setting.UpdatedControls.Add(ajxUpdatedControl)
  
                    ajxUpdatedControl.UpdatePanelRenderMode = updatePanelRenderMode
  
                    If Not updatePanelHeight.IsEmpty Then
  
                        ajxUpdatedControl.UpdatePanelHeight = updatePanelHeight
  
                    End If
  
                Else
  
                    Throw New Exception("The initiatorControl or updatedControl is NULL. Cannot add AjaxSetting.")
  
                End If
  
            Else
  
                Throw New Exception("Telerik RadAjaxManager not found on page. Set UseSharedAjaxManager property to True in Page_Init event or add a Telerik RadAjaxManager control to the page.")
  
            End If
  
        End Sub
Maria Ilieva
Telerik team
 answered on 09 Mar 2012
2 answers
109 views
We use the RAD Tab strip to divide the form under various sections and noticed that when we try to set a textbox value of one tab with value entered in another tab, we get an overlapping style in the target textbox.

This happens if the target textbox has a empty message set. I've attached the markup code below:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <script type="text/javascript" id="telerikClientEvents1">
//<![CDATA[
 
        function txtTab1Title_ClientOnBlur(sender, args) {
            //Add JavaScript handler code here
            var ctrl1 = $("input[id$='txtTab2Title']");
            var txtTab2Title = $find(ctrl1.get(0).id);
            txtTab2Title.set_value(sender.get_value());
        }
 
        function txtTab2Title_ClientOnBlur(sender, args) {
            //Add JavaScript handler code here
            var ctrl1 = $("input[id$='txtTab1Title']");
            var txtTab1Title = $find(ctrl1.get(0).id);
            txtTab1Title.set_value(sender.get_value());
        }
//]]>
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.       
    </script>
    <div class="MasterContainer">
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
            SelectedIndex="0" Skin="Hay" Width="100%">
            <Tabs>
                <telerik:RadTab runat="server" Text="Tab1" Value="Tab1" Owner="RadTabStrip1"
                    Selected="True" PageViewID="rpvTab1" />
                <telerik:RadTab runat="server" Text="Tab2" Value="Tab2" Owner="RadTabStrip1" PageViewID="rpvTab2" />
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
            <telerik:RadPageView ID="rpvTab1" runat="server" Selected="true" Width="100%">
                <h4>
                    Tab1 Tab Contents</h4>
                <div class="FormContainer">
                    <telerik:RadTextBox ID="txtTab1Title" runat="server" EmptyMessage="Tab1 Title"
                        Label="Title:" Width="400px">
                        <ClientEvents OnBlur="txtTab1Title_ClientOnBlur" />
                    </telerik:RadTextBox>
                </div>
            </telerik:RadPageView>
            <telerik:RadPageView ID="rpvTab2" runat="server" Width="100%">
                <h4>
                    Tab2 Tab Contents</h4>
                <div class="FormContainer">
                    <telerik:RadTextBox ID="txtTab2Title" runat="server" EmptyMessage="Tab2 Tab Title"
                        Label="Title:" Width="400px">
                        <ClientEvents OnBlur="txtTab2Title_ClientOnBlur" />
                    </telerik:RadTextBox>
                </div>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </div>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    </form>
</body>
</html>


Vasil
Telerik team
 answered on 09 Mar 2012
1 answer
125 views
Hi everybody, i created, a site map dinamically, but all the nodes assume tha same navigateUrl.

Is possible to make that dinamically ? if so, how?
thnkz
<telerik:RadSiteMap runat="server" ID="RadSiteMap1"
    DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Text" ShowNodeLines="true">
    <DataBindings>
        <telerik:RadSiteMapNodeBinding NavigateUrl="#" />
    </DataBindings>
</telerik:RadSiteMap>
protected void Page_Load(object sender, EventArgs e)
       {
           RadSiteMap1.DataSource = SiteDataItem.GetSiteData();
           RadSiteMap1.DataBind();
       }
       /// <summary>
       /// Método que encapsula os atributos e monta a lista.
       /// </summary>
       public class SiteDataItem
       {
           private string _text;
           private int _parentId;
           private int prvID;
           private string prvLink;
 
           /// <summary>
           /// Descrição dos nodes
           /// </summary>
           public string Text
           {
               get { return _text; }
               set { _text = value; }
           }
           /// <summary>
           /// ID do node
           /// </summary>
           public int ID
           {
               get { return prvID; }
               set { prvID = value; }
           }
           /// <summary>
           /// ID de node pai
           /// </summary>
           public int ParentID
           {
               get { return _parentId; }
               set { _parentId = value; }
           }
           /// <summary>
           /// Atribui valor aos campos.
           /// </summary>
           /// <param name="ID"></param>
           /// <param name="nivel0"></param>
           /// <param name="nivel1"></param>
           /// <param name="nivel2"></param>
           /// <param name="nivel3"></param>
           /// <param name="nivel4"></param>
           /// <param name="text"></param>
           /// int ID, int nivel0, int nivel1, int nivel2, int nivel3, int nivel4,
           public SiteDataItem(int id, int parentId, string text)
           {
               //prvNivel0 = nivel0;
               //prvNivel1 = nivel1;
               //prvNivel2 = nivel2;
               //prvNivel3 = nivel3;
               //prvNivel4 = nivel4;
               prvID = id;
               _parentId = parentId;
               _text = text;
           }
           /// <summary>
           /// Monta a lista TreeView.
           /// </summary>
           /// <returns>Lista com dados TreeView.</returns>
           public static List<SiteDataItem> GetSiteData()
           {
               List<SiteDataItem> siteData = new List<SiteDataItem>();
 
               siteData.Add(new SiteDataItem(1, 0, "Products"));
               siteData.Add(new SiteDataItem(2, 1, "RadControls for ASP.NET Ajax"));
               siteData.Add(new SiteDataItem(3, 1, "RadControls for Silverlight"));
               siteData.Add(new SiteDataItem(4, 2, "RadGrid"));
               siteData.Add(new SiteDataItem(5, 2, "RadScheduler"));
               siteData.Add(new SiteDataItem(6, 2, "RadEditor"));
               siteData.Add(new SiteDataItem(7, 3, "RadGrid"));
               siteData.Add(new SiteDataItem(8, 3, "RadMenu"));
               siteData.Add(new SiteDataItem(9, 3, "RadEditor"));
 
               return siteData;
           }
       }
Peter
Telerik team
 answered on 09 Mar 2012
1 answer
106 views
Hi,
 In the following demo on telerik site if I click on html file in attachment column for downloading it in IE and click open option, it redirects me to that page instead of opening a new window. I have a requirement wherein new window should be opened for attachment if it is html file.

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/gridattachmentcolumn/defaultcs.aspx 

Regards,
mahesh
Andrey
Telerik team
 answered on 09 Mar 2012
2 answers
73 views
Hi,

We would like to change the forecolor of WeightItem of the tag cloud control, currently weightitem has been set with grey color, the issue is, we have background image(see the screen shot) for cloud control and it also has the grey color so weight item is not visible properly. we will be able to solve this if we can change the color of the weight item.

Thanks
Venkat
Venkatakrishna
Top achievements
Rank 1
 answered on 09 Mar 2012
5 answers
76 views
Hello,

I have a problem regarding the scheduler. I have bind the break data using in calender(see the attachment file which content data of break or block). In weekly view, i want to delete particular date from the calender. I used the (e.Appointment.Start.Date) or RadScheduler1.SelectedDate  to find the date. It is not delete the selected break or block date.

But no problem in day view. It is delete the selected date. But the problem in weekly view. In weekly view, RadScheduler1.SelectedDate not work because it only delete the today date.

Please help me as soon as possible

Thanks

Jiten Mutum
Plamen
Telerik team
 answered on 09 Mar 2012
1 answer
346 views
Good afternoon,

I am using the CSS div layout from 960.gs. Works like a charm with all ASP.Net AJAX controls apart RadButton.

When I set the button width to 100% to fill the div it always edges out ( see attached image ).

How can I avoid that ?

TIA,

S.R.
Bozhidar
Telerik team
 answered on 09 Mar 2012
3 answers
130 views
Hi,

While clicking on grid header for sorting an extra button becomes visible.Why this happens?

Help me.
Thnx in advance
Princy
Top achievements
Rank 2
 answered on 09 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?