Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
97 views
Hello,

Following some samples in forums, my intention was to insert an EditorDropDown during Page_Load with
                        EditorDropDown ddn          =   new EditorDropDown("TranslateTool");  
                       ddn.Text                     =   "Translate";  
                       ddn.Width                    =   new Unit("130px");  
                        e1.Tools[0].Tools.Insert(0,ddn);    
 

but I get a crash, my editor being created in OnInit with
                    RadEditor e1                    =   new RadEditor();  
                    e1.ID                           =   string.Format("RadEdt{0}_{1}",ID,fldName);  
                    e1.ToolbarMode                  =    EditorToolbarMode.ShowOnFocus;  
                    e1.Content                      =   desc.LongVal;  
                    e1.Width                        =   memoWidth;  
 

I suspect that ShowOnfocus is the reason of this crash.

Is it possible to insert a tool during Page_Load when using ShowOnFocus.

Thanks for help.
CS
CSurieux
Top achievements
Rank 2
 answered on 15 Sep 2009
1 answer
141 views
Hello,

Do you know if it's possible to pilote the scheduler of Lotus Notes with le RadScheduler ?


Thank you

Jean-Yves
Schlurk
Top achievements
Rank 2
 answered on 15 Sep 2009
1 answer
89 views
I have a grid that allows the user to reorder columns. I've set AllowColumnsReorder to true, which allows the user to drag and drop to reorder columns, but I'm not sure how I can tell what order the columns are in after the user is done. Can I figure that out by iterating through the Columns collection to find the order of the columns? If so, how would I do that? Alternatively, is there an event that fires when a column is reordered? Should I keep track of the column order using that event?

Thanks!
Schlurk
Top achievements
Rank 2
 answered on 15 Sep 2009
1 answer
109 views
Hi,

I have radgrid. Inside radgrid there is tabstrip. Tabstrip has button. When i click button i want open radwindow. When i open window i want pass querystring as Id filed.

How can i do that?, Is there any sample?

I try to do like this. But its not working
  "Response.Write("<script language = Javascript>var win= radopen('DocumentInfo.aspx','RadWindow1');</script>");"


lakmal




Jake
Top achievements
Rank 1
 answered on 15 Sep 2009
18 answers
438 views
I have been looking but I can't seem to find an example on this. What I have right now is a rad calendar that is bound to an sql datasource. It views fine. What I want is on the initial page load for everything to be not shown. I will eventually have a treeview on the left side that will have js client events so when  user checks one of the items, it shows the appointment. When they uncheck the item, it will hide the appointment again. I would like to do all of this on the client side. I.e. I want to still load all of the appointments on the page load but set them to hidden. I then want to show only the ones they check on. Is there anyway to do this? Thanks
Web Services
Top achievements
Rank 2
 answered on 15 Sep 2009
1 answer
246 views

I am getting the pagemethods is undefined message in my pageLoad method. Can you suggest how to fix this error?

this is my webusercontrol for my grid with the pageload method

 

Thaks for your help - John

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MasterPartsList.ascx.cs" 
   Inherits="UserControls_MasterPartsList" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%" 
   VisibleDuringInit="false">  
   <telerik:RadPane ID="Radpane2" runat="server">  
      <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">  
         <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid2">  
               <UpdatedControls> 
                  <telerik:AjaxUpdatedControl ControlID="RadGrid2" /> 
               </UpdatedControls> 
            </telerik:AjaxSetting> 
         </AjaxSettings> 
      </telerik:RadAjaxManagerProxy> 
      <telerik:RadScriptBlock ID="RadCodeBlock1" runat="server">  
 
         <script type="text/javascript">  
        <!--  
             function pageLoad(sender, eventArgs) {  
 
                 var tableView = $find("<%= RadGrid2.ClientID %>").get_masterTableView();  
 
                 PageMethods.GetData(0,   
                                     tableView.get_pageSize(),  
                                     tableView.get_sortExpressions().toString(),   
                                     tableView.get_filterExpressions().toList(),  
                                     updateGrid);  
 
                 PageMethods.GetCount(tableView.get_filterExpressions().toList(), updateVirtualItemCount);  
             }  
 
             function RadGrid2_Command(sender, args) {  
                 args.set_cancel(true);  
 
                 var pageSize = sender.get_masterTableView().get_pageSize();  
 
                 var sortExpressions = sender.get_masterTableView().get_sortExpressions();  
                 var filterExpressions = sender.get_masterTableView().get_filterExpressions();  
 
                 var currentPageIndex = sender.get_masterTableView().get_currentPageIndex();  
 
                 if (args.get_commandName() == "Filter")  
                     currentPageIndex = 0;  
 
 
                 var sortExpressionssortExpressionsAsSQL = sortExpressions.toString();  
                 var filterExpressionsfilterExpressionsAsSQL = filterExpressions.toString();  
 
                 PageMethods.GetData(currentPageIndex * pageSize, pageSize, sortExpressionsAsSQL, filterExpressions.toList(), updateGrid);  
 
                 if (args.get_commandName() == "Filter") {  
                     PageMethods.GetCount(filterExpressions.toList(), updateVirtualItemCount);  
                 }  
             }  
 
             function updateGrid(result) {  
                 var tableView = $find("<%= RadGrid2.ClientID %>").get_masterTableView();  
                 tableView.set_dataSource(result);  
                 tableView.dataBind();  
             }  
 
             function updateVirtualItemCount(result) {  
                 var tableView = $find("<%= RadGrid2.ClientID %>").get_masterTableView();  
                 tableView.set_virtualItemCount(result);  
             }  
 
             function toggleAllowMultiColumnSorting(sender, e) {  
                 var tableView = $find("<%= RadGrid2.ClientID %>").get_masterTableView();  
                 tableView.set_allowMultiColumnSorting(sender.checked);  
             }  
 
             function RadGrid2_RowDataBound(sender, args) {  
                 var radTextBoxPartNumber = args.get_item().findControl("PartNumber"); // find control  
                 radTextBoxPartNumber.set_value(args.get_dataItem()["PartNumber"]);  
 
                 // conditional formatting  
                 args.get_item().get_cell("TitleOfCourtesy").style.fontWeight = (args.get_dataItem()["TitleOfCourtesy"] == "Dr.") ? "bold" : "normal";  
 
                 var sb = new Sys.StringBuilder();  
 
                 sb.appendLine("<b>RadGrid2_RowDataBound</b><br />");  
 
                 for (var item in args.get_dataItem()) {  
                     sb.appendLine(String.format("{0} : {1}<br />", item, args.get_dataItem()[item]));  
                 }  
 
                 sb.appendLine("<br />");  
                 sb.appendLine("<br />");  
             }  
        --> 
         </script> 
 
      </telerik:RadScriptBlock> 
      <telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="False" AllowAutomaticInserts="True" 
         AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" GridLines="None" PageSize="25" 
         AllowPaging="True" AllowSorting="True" OnNeedDataSource="RadGrid2_NeedDataSource" 
         OnDeleteCommand="RadGrid2_DeleteCommand" OnInsertCommand="RadGrid2_InsertCommand" 
         OnUpdateCommand="RadGrid2_UpdateCommand"   
         OnDataBound="RadGrid2_DataBound"   
         AllowFilteringByColumn="True">  
         <PagerStyle Mode="NextPrevAndNumeric" /> 
         <MasterTableView DataKeyNames="Id" CommandItemDisplay="TopAndBottom" EditMode="InPlace">  
            <Columns> 
               <telerik:GridBoundColumn DataField="Id" DataType="system.Int64" HeaderText="Id" ReadOnly="True" 
                  SortExpression="Id" UniqueName="Id" Visible="false">  
               </telerik:GridBoundColumn> 
               <telerik:GridTemplateColumn HeaderText="PartNumber" SortExpression="PartNumber" 
                  UniqueName="PartNumberColumn" EditFormColumnIndex="1">  
                  <ItemTemplate> 
                     <telerik:RadTextBox runat="server" ID="PartNumber" ></telerik:RadTextBox> 
                  </ItemTemplate> 
               </telerik:GridTemplateColumn> 
               <telerik:GridTemplateColumn HeaderText="Description" SortExpression="Description" 
                  UniqueName="Description" EditFormColumnIndex="2">  
                  <ItemTemplate> 
                     <telerik:RadTextBox runat="server" ID="Description" ></telerik:RadTextBox> 
                  </ItemTemplate> 
               </telerik:GridTemplateColumn> 
               <telerik:GridTemplateColumn HeaderText="PartType" SortExpression="PartType" UniqueName="PartType" 
                  EditFormColumnIndex="3">  
                  <ItemTemplate> 
                     <telerik:RadComboBox runat="server" ID="PartType">  
                     </telerik:RadComboBox> 
                  </ItemTemplate> 
               </telerik:GridTemplateColumn> 
               <telerik:GridTemplateColumn HeaderText="UOM" SortExpression="UnitOfMeasure" UniqueName="UnitOfMeasure" 
                  EditFormColumnIndex="4">  
                  <ItemTemplate> 
                     <asp:Label runat="server" ID="LblUnitOfMeasure" Text='<%# Eval("UnitOfMeasure") %>'>  
                     </asp:Label> 
                     &nbsp;  
                  </ItemTemplate> 
                  <EditItemTemplate>                   
                     <telerik:GridDropDownColumn DataField="UnitOfMeasure" HeaderText="UOM" ListTextField="Code" 
                        ListValueField="Description" UniqueName="UnitOfMeasure"   
                        DropDownControlType="RadComboBox" AllowSorting="true">  
                     </telerik:GridDropDownColumn> 
                  </EditItemTemplate> 
               </telerik:GridTemplateColumn> 
               <telerik:GridTemplateColumn HeaderText="Comm Code" SortExpression="CommodityCode" 
                  UniqueName="CommodityCode" EditFormColumnIndex="5">  
                  <ItemTemplate> 
                     <asp:Label runat="server" ID="LblCommodityCode" Text='<%# Eval("CommodityCode") %>'></asp:Label> 
                  </ItemTemplate> 
                  <EditItemTemplate> 
                     <telerik:GridDropDownColumn DataField="CommodityCode" HeaderText="UOM" ListTextField="Code" 
                        ListValueField="Description" UniqueName="CommodityCode">  
                     </telerik:GridDropDownColumn> 
                  </EditItemTemplate> 
               </telerik:GridTemplateColumn> 
               <telerik:GridEditCommandColumn ButtonType="ImageButton">  
                  <HeaderStyle Width="20px" /> 
                  <ItemStyle CssClass="MyImageButton" /> 
               </telerik:GridEditCommandColumn> 
               <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete" 
                  UniqueName="DeleteColumn" ConfirmText="Delete this Part?">  
                  <HeaderStyle Width="20px" /> 
                  <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> 
               </telerik:GridButtonColumn> 
            </Columns> 
            <EditFormSettings ColumnNumber="2" CaptionDataField="PartNumber" CaptionFormatString="Edit properties of Part {0}">  
               <FormTableItemStyle Wrap="False"></FormTableItemStyle> 
               <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle> 
               <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White" 
                  Width="100%" /> 
               <FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" Height="110px" 
                  BackColor="White" /> 
               <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
               <EditColumn ButtonType="ImageButton" InsertText="Insert Order" UpdateText="Update record" 
                  UniqueName="EditCommandColumn1" CancelText="Cancel edit">  
               </EditColumn> 
               <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle> 
            </EditFormSettings> 
         </MasterTableView> 
      </telerik:RadGrid> 
   </telerik:RadPane> 
</telerik:RadSplitter> 
 


and this is the .aspx page which contains the webusercontrol

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Proposal.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register TagPrefix="nwd" TagName="ProposalDetailsPage" Src="~/UserControls/ProposalDetails.ascx" %> 
<%@ Register TagPrefix="nwd" TagName="MasterPartsListPage" Src="~/UserControls/MasterPartsList.ascx" %> 
<%@ Register TagPrefix="nwd" TagName="StructurePage" Src="~/UserControls/Structure.ascx" %> 
<%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %> 
<%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %> 
<%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">  
<head runat="server">  
   <title>Harris Corporation | Proposal Material Management Application</title> 
   <link href="Styles/Styles.css" rel="stylesheet" type="text/css" /> 
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
   <qsf:HeadTag ID="Headtag1" runat="server"></qsf:HeadTag> 
   <style type="text/css">  
      .rcbHeader ul, .rcbFooter ul, .rcbItem ul, .rcbHovered ul, .rcbDisabled ul  
      {  
         width: 100%;  
         display: inline-block;  
         margin: 0;  
         padding: 0;  
         list-style-type: none;  
      }  
      .rcbHeader ul:after, .rcbFooter ul:after, .rcbItem ul:after, .rcbHovered ul:after, .rcbDisabled ul:after  
      {  
         content: ".";  
         display: block;  
         visibility: hidden;  
         font-size: 0;  
         line-height: 0;  
         height: 0;  
         clear: both;  
      }  
      .col1, .col2, .col3  
      {  
         float: left;  
         width: 120px;  
         margin: 0;  
         padding: 0 5px 0 0;  
         line-height: 14px;  
      }  
      label.text  
      {  
         font: 13px 'Segoe UI' , Arial, sans-serif;  
         color: #4888a2;  
         padding: 6px 18px 0 0;  
         display: inline-block;  
         clear: both;  
         width: 150px;  
      }  
      .combo-list  
      {  
         list-style: none;  
         padding: 0;  
         margin: 0;  
      }  
   </style> 
</head> 
<body> 
   <form id="form2" runat="server">  
      <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">  
         <Scripts> 
            <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" /> 
         </Scripts> 
      </asp:ScriptManager> 
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
      </telerik:RadAjaxManager> 
      <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" DecoratedControls="All" 
         DecorationZoneID="decorationZone" /> 
      <div class="wrapper">  
         <div class="header">  
            <h1> 
               Mammoth</h1> 
            <h2> 
               Material Costing Application</h2> 
            <br /> 
            <h3> 
               Proposal:  
               <asp:PlaceHolder ID="placeHolderProposalName" runat="server" /> 
            </h3> 
            <div class="chooser">  
               <label for="SkinChooser_Input">  
                  Choose skin:</label> 
               <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" Skin="Office2007" 
                  Enabled="true" PersistenceMode="Session">  
               </telerik:RadSkinManager> 
            </div> 
         </div> 
         <div class="tabstrip">  
            <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" 
               SelectedIndex="0" ShowBaseLine="true">  
               <Tabs> 
                  <telerik:RadTab Text="Details">  
                  </telerik:RadTab> 
                  <telerik:RadTab Text="Master Parts List">  
                  </telerik:RadTab> 
                  <telerik:RadTab Text="Structure">  
                  </telerik:RadTab> 
               </Tabs> 
            </telerik:RadTabStrip> 
         </div> 
         <div id="decorationZone" class="splitter">  
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="pageView">  
               <telerik:RadPageView ID="RadPageView1" runat="server">  
                  <nwd:ProposalDetailsPage ID="ProposalDetailsPage" runat="server" navigationlanguage="c#" /> 
               </telerik:RadPageView> 
               <telerik:RadPageView ID="RadPageView2" runat="server">  
                  <nwd:MasterPartsListPage ID="MasterPartsListPage" runat="server" navigationlanguage="c#" /> 
               </telerik:RadPageView> 
               <telerik:RadPageView ID="RadPageView3" runat="server">  
                  <nwd:StructurePage ID="StructurePage" runat="server" navigationlanguage="c#" /> 
               </telerik:RadPageView> 
            </telerik:RadMultiPage> 
         </div> 
         <div class="footer">  
            <br /> 
            <asp:HyperLink ID="returnToProposalIndex" runat="server" NavigateUrl="~/Default.aspx">Return to Proposal Index</asp:HyperLink> 
         </div> 
      </div> 
   </form> 
</body> 
</html> 
 

 

Tsvetoslav
Telerik team
 answered on 15 Sep 2009
2 answers
870 views
I have one grid on my page, that I am performing Insert/Update/Delete operations on.  On the page I have the RadAjaxManagerProxy (I'm doign this in a UserControl), the RadAjaxLoadingPanel, and the RadGrid.  I am not using a datasource on the page, but am binding to a datasource on the server.  All Insert/Update/Delete events are being bound on the server side also.

All events fire, all data operations are performing correctly, and I am calling the Rebind() method after the data operations.  However, the grid itself does not show the updated results unless I refresh the page completely.

As I've seen suggested on other posts, I've trie disabling the grid viewstate, and tried wrapping the grid in a RadAjaxPanel.  Nothing works.  What do I need to do to get the grid to refresh???
Random Blackburn
Top achievements
Rank 1
 answered on 15 Sep 2009
3 answers
110 views
Hi, I would like just basic sorting, but I don't know why, but I don't see link and image, and does't not work...

 <telerik:RadGrid ID="radGridUsers"
                    AllowAutomaticUpdates="False"
                    AllowAutomaticDeletes="False"
                    AutoGenerateColumns="False"
                    AllowPaging="True"
                    AllowSorting="True"
                    GridLines="None"
                    runat="server"
                    AllowMultiRowSelection="True"
                    PageSize="5"
                    OnNeedDataSource="radGridUsers_NeedDataSource"
                    OnItemCommand="radGridUsers_ItemCommand"
                    OnItemCreated="radGridUsers_ItemCreated"
                    OnDataBound="radGridUsers_DataBound" Width="100%">
                    <PagerStyle Mode="NextPrevAndNumeric" />
                    <MasterTableView
                        Width="100%"
                        CommandItemDisplay="Top"                     
                        DataKeyNames="PK_Users"
                        ClientDataKeyNames="PK_Users"
                        OverrideDataSourceControlSorting="true" >
                        <CommandItemTemplate>
                            <div style="padding: 5px 5px;">
                                <asp:LinkButton ID="lnkAdd" OnClientClick="return radGridUsers_AddNewUser();" runat="server">                                    
                                    <img src="<%# GetImage("Add") %>" style="border:0px" alt="" />
                                    <asp:Label ID="Label3" runat="server" meta:resourcekey="GridViewColumn_Command_Insert"  />
                                </asp:LinkButton>
                                &nbsp;&nbsp;                        
                                <asp:LinkButton ID="lnkDelete" runat="server" CommandName="DeleteSelectedUsers">
                                    <img src="<%# GetImage("Delete") %>" style="border:0px" alt="" />
                                    <asp:Label ID="Label2" runat="server" meta:resourcekey="GridViewColumn_Command_Delete"  />                                                             
                                </asp:LinkButton>
                                &nbsp;&nbsp;
                                <asp:LinkButton ID="lnkRefresh" runat="server" CommandName="RebindGrid">
                                    <img src="<%# GetImage("Refresh") %>" style="border:0px" alt="" />
                                    <asp:Label ID="Label1" runat="server" meta:resourcekey="GridViewColumn_Command_Refresh"  />                                 
                                </asp:LinkButton>
                                &nbsp;&nbsp;
                                <asp:LinkButton ID="lnkShowColumnPhoto" runat="server" CommandName="ShowHideColumnPhoto">
                                    <asp:Label ID="Label4" runat="server" meta:resourcekey="GridViewColumn_Command_ShowHidePhoto" Text="Show/hide column photo" />
                                </asp:LinkButton>                                
                                &nbsp;&nbsp;
                                <asp:LinkButton ID="lnkSync" runat="server">
                                    
                                    <asp:Label ID="Label5" runat="server" Text="Synchronise with tavis" />
                                </asp:LinkButton>                                                                
                            </div>
                        </CommandItemTemplate>
                        <Columns>        
                            <telerik:GridBoundColumn DataField="Name" UniqueName="Name"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="BadgeCode" UniqueName="BadgeCode"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Description" UniqueName="Description"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="IsInactive" UniqueName="IsInactive"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="IsLocalUser" UniqueName="IsLocalUser"></telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CardsMode" UniqueName="CardsMode"></telerik:GridBoundColumn>
                            <telerik:GridBinaryImageColumn DataField="Photo" UniqueName="Photo" ImageAlign="NotSet" ImageHeight="80px" ImageWidth="80px" ResizeMode="Fit" />
                        </Columns>
                    </MasterTableView>
                    <ClientSettings>
                        <ClientEvents
                            OnRowDblClick="radGridUsers_ClientRowDblClick"/>
                        <Selecting AllowRowSelect="True"/>
                    </ClientSettings>      
                </telerik:RadGrid>   
             </telerik:RadAjaxPanel>           

Thanks for your help...

Sophie
Top achievements
Rank 1
 answered on 15 Sep 2009
7 answers
202 views
I have a calendar you can view here
http://alpha.clickablecommunity.com/Calendar.aspx
When the page loads initially the calendar views fine. However, as soon as you change the view i.e. to day or month the calendar gets wider. However, if you resize your browser window at all (doubleclick to resize down and then resize up again), then it goes back to the proper size. I am completely stumped on this one. Here is my code.
aspx
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.Master" CodeBehind="Calendar.aspx.vb" Inherits="ClickableCommunity.Calendar" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    function HideAppointment() {  
    
        var Scheduler = $find('<%= RadScheduler1.ClientID %>');  
        var app1 = Scheduler.get_appointments();  
        alert("Hiding the appointment : " + app1.getAppointment(1).get_subject());
        app1.getAppointment(1).style.display = "none";    // Hide the first appointment   
        
    }//HideAppointment
    function ShowAppointment() {  
    
        var Scheduler = $find('<%= RadScheduler1.ClientID %>');  
        var app1 = Scheduler.get_appointments();  
        alert("Showing the appointment : " + app1.getAppointment(1).get_subject());
        app1.getAppointment(1)._domElements[0].style.display = "block";   // Show the first appointment
        
    }//ShowAppointment
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="header" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="menuContent" runat="server">
<span style="padding-left:10px;">Coming soon...<br />
                                <a href="#" onclick="HideAppointment()">Hide</a></span>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
<div id="divCalendar">
    <telerik:RadScheduler ID="RadScheduler1" runat="server" Height="500px"
                          HoursPanelTimeFormat="htt" Skin="Web20" ValidationGroup="RadScheduler1"
                          GroupingDirection="Vertical" CssClass="calendarView"
        SelectedView="WeekView"
        WeekView-DayStartTime="08:00:00"
        WeekView-DayEndTime="23:59:00"
        WeekView-WorkDayEndTime="23:59:00"
        WeekView-WorkDayStartTime="08:00:00"
        WorkDayEndTime="23:59:00"
        DayEndTime="23:59:00"
        DayView-DayEndTime="23:59:00"
        DayView-DayStartTime="08:00:00"
        DayView-WorkDayEndTime="23:59:00"
        DayView-WorkDayStartTime="08:00:00" AllowDelete="false" AllowEdit="false" AllowInsert="false"
        TimelineView-NumberOfSlots="7">
        <DayView GroupingDirection="Horizontal" UserSelectable="True"  />
        <TimelineView GroupingDirection="Horizontal" />
        <WeekView GroupingDirection="Horizontal" />
    </telerik:RadScheduler>
    </div>
<asp:SqlDataSource ID="eventsDataSource" runat="server"
    ConnectionString="<%$ ConnectionStrings:connectionString %>"
    SelectCommand="returnAllEvents" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
</asp:Content>

VB
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Partial Public Class Calendar
    Inherits System.Web.UI.Page

    'my connection string
    Dim conn As String = System.Configuration.ConfigurationManager.ConnectionStrings("connectionString").ToString
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not (Page.IsPostBack) Then

            Dim table As DataTable = New DataTable()
            table.Columns.Add("start")
            table.Columns.Add("end")
            table.Columns.Add("key")
            table.Columns.Add("subject")

            'my sql connection
            Dim myConn As New Data.SqlClient.SqlConnection(conn)

            'the name of the stored procedure
            Dim strSQL = "returnAllEvents"

            Dim returnCommand As New Data.SqlClient.SqlCommand(strSQL, myConn)

            'tell the system it is a stored procedure
            returnCommand.CommandType = CommandType.StoredProcedure

            Try
                myConn.Open()
                Dim dr As SqlDataReader = returnCommand.ExecuteReader()

                While dr.Read()

                    '0eventid, 1FK_CategoryID, 2latitude, 3longitude, 4events.name, 5description, 6businesses.name,
                    '7starttime, 8stoptime, 9locations.street, 10locations.city, 11locations.state, 12locations.zip

                    'set all of the textboxes to the input
                    table.Rows.Add(New String() {dr.Item(7), dr.Item(8), dr.Item(0), _
                                                 "Name: " & dr.Item(6)})

                End While 'while dr.read()

            Catch ex As Exception

            Finally

            End Try

            Dim calendar As RadScheduler = RadScheduler1
            calendar.DataSource = table
            calendar.DataStartField = "start"
            calendar.DataEndField = "end"
            calendar.DataKeyField = "key"
            calendar.DataSubjectField = "subject"
            calendar.DataBind()

        End If 'if not page.ispostback
    End Sub

End Class

Master page
 <%@ Master Language="VB" AutoEventWireup="false" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="loginDivTemplate" TagName="login" src="/ascx/loginTemplate.ascx"%>
<!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">
<%@ import namespace="System.Data" %>
<%@ import namespace="System.Data.Sql" %>
<%@ import namespace="System.Data.SqlClient" %>
<%@ import namespace="Telerik.Web.UI" %>
<head id="Head1" runat="server">
    <link href="ClickableCommunity.css" rel="stylesheet" type="text/css" />
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body id="MasterBody" runat="server" style="margin: 0px; height: 100%; overflow: hidden;">
    <form id="Form1" method="post" runat="server" style="height: 100%">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
    <asp:ContentPlaceHolder ID="header" runat="server">
    </asp:ContentPlaceHolder>
    <div id="loginDiv">
        <loginDivTemplate:login id="loginPanelContent" runat="server"></loginDivTemplate:login>
    </div>
    <div id="topDiv">
        <div id="image" class="topDivImage">
            <img src="images/logo.jpg" alt="Clickable Community Logo" width="200" height="75" />
        </div>
        <div id="viewMenu" class="viewMenu">
            <center>
                <table><tr><td>
                    <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Web20">
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="Events View">
                                <Items>
                                    <telerik:RadMenuItem runat="server" NavigateUrl="~/Default.aspx" Text="Map">
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem runat="server" NavigateUrl="~/Lis.aspx" Text="List">
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem runat="server" Text="Calendar" NavigateUrl="Calendar.aspx">
                                    </telerik:RadMenuItem>
                                </Items>
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenu>
                </td></tr></table>
            </center>
        </div>
    </div>
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" Width="100%" CssClass="AllContent" LiveResize="true">
        <telerik:RadPane ID="LeftRadPane1" runat="server" Width="220px" Scrolling="Both"
            BorderStyle="None" BorderSize="0">
            <div id="leftPanel">
                <asp:ContentPlaceHolder ID="menuContent" runat="server">
                    
                </asp:ContentPlaceHolder>
            </div>
        </telerik:RadPane>
        <telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Forward" EnableResize="false"
            ForeColor='Green' />
        <telerik:RadPane ID="RightRadPane1" runat="server" CssClass="RightPanelPadding" Scrolling="Both"
            BorderStyle="None" BorderSize="0" Height="100%">
            <asp:ContentPlaceHolder ID="MainContent" runat="server">
            
            </asp:ContentPlaceHolder>
        </telerik:RadPane>
        
    </telerik:RadSplitter>
    </form>
</body>
</html>
And css
html, body, form  
{  
   height: 100%;
   width: 100%;
   margin: 0;  
   padding:0;  
}
#leftPanel{
    display:inline;
    width:220px;
    border-top-style: none;
    border-right-style: none;
    border-left-style: none;
        
}
.normalText{
    font-size:12px;
    font-family: Arial;
}
.loginLabel{
    padding-right: 10px;
    padding-bottom: 10px;
}
.loginTextBox{
    width: 120px;
}
.leftPanelContent{
    padding-bottom: 30px;
}
#topDiv{
    height: 60px;
    border-bottom-width: 4px;
    border-bottom-color: Gray;
    border-bottom-style:groove;
        
}
.calendarView{
    width:auto !important;
}
.tableColumn{
    width:150px;
}
#loginDiv{
    position: absolute;
    display:inline;
    right: 10px;
    top: 5px;
}
#menuDiv{
    position: absolute;
    padding-top: 75px;
    margin-left: auto;
    margin-right:auto;
}
.AllContent{
    border-right: none;
    height: auto;
    
}
.businessToolTip{
    position: absolute;
    z-index: 500;
    top:300px;
    left:300px;
}
.stateDropDownText{
    font-size: 11px;
    font-family: Arial;

}
.adminTableDiv{
    text-align: center;
    width: 200px;
    height:100%;
    padding-right:20px;
    display: inline;
}
.adminMainDiv{
    width: 420px;
}
.center{
    padding-left:auto;
    padding-right:auto;
}
.textRed{
    color: Red;
}
.successText{
    color:Green;
}
.addBusinessSpacing{
    padding-right: 20px;
    height: 70px;
}
.adminTableLabel{
    text-align: center;
    display: block;
}
.addBusinessTextBox{
    width:150px;
    text-align:center;
}
#MainContent{
    display:inline;

}
.displayInline{
    display: inline;
}
#divMap{
    height: 500px;
    border: groove 4px #EEEEEE;
    border-right: groove 4px #EEEEEE;
    margin-left: auto;
    margin-right: auto;
    padding-right: 10px;
}
#divCalendar{
    height: 500px;
    border: groove 4px #EEEEEE;
    margin-left: auto;
    margin-right: auto;
    width:auto;
}
.RightPanelPadding
{
    position: relative;
    height:auto !important;
    padding-left: 10px;
    padding-top:10px;
    padding-right:10px;
    padding-bottom: 10px;
    margin-top: auto;
    margin-bottom: auto;
    
    
}
.errorMessage{
    color: Red;
    font-size: 10px;
    font-family: Arial;
}
.topDivImage{
position: absolute;
top: 0;
left: 0;
display:inline;
width:220px;
}
.viewMenu{
padding-left:220px;
margin-right:auto;
margin-left:auto;
text-align:center;
width:800px;
vertical-align:bottom;
padding-top: 34px;
}
.emptyTextboxText{

    font-style:italic;
    font-size:10px;
    color: #D8D8D8;

}

Although I bind it in the codebehind, you can do it in the aspx page and get the same problem. Any ideas? Thanks,


Web Services
Top achievements
Rank 2
 answered on 15 Sep 2009
4 answers
92 views
Hi all, I'm having a bit of a strange problem (albeit minor) in which if the ComboBox is clicked before a page is finished loading, the menu opens up in the bottom right corner of the page as apposed to under the combobox as it should be.  I'm wondering if this is a documented issue or if it is something that should be fixable on my end.  This isn't a major issue as our clients would really have to WORK to click the combobox box before the page loads and still the combobox still functions, however I'd really like to fix this problem if possible!

Thank you!
Simon
Telerik team
 answered on 15 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?