Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
83 views
Hello,

I'm using the SlidingZone and SlidingPanes with the Splitter control and I have an issue.  I would like to set the DockOnOpen option to true for each of my slidingpanes.  When a SlidingPane is docked or undocked, I need to have a function execute so a control in a adjoing container is resized properly.  So I'm using the OnClientDocked and OnClientUnDocked events to execute my custom function.  This works great when there are no SlidingPanes initially open, but when I go to select on another SlidingPane the code gets executed twice and causes a problem with .  When I put some alerts in, I noticed that a SlidingPane will get undocked and then the one I clicked on will get docked, thus leading to my function being executed twice.   What I really want to happen is when a user clicks the undock icon of a SlidingPane to execute my function and not when they are trying to open (dock) another SlidingPane (which undocks all other panes).  Is it possible to determine when a user clicks the undock icon?  Or a way with another event? 

Thanks in advance for any tips or advice.


Juan     
Juan
Top achievements
Rank 1
 answered on 27 Aug 2010
1 answer
133 views
Hi,

I am getting strange behaviour with RadEditor. Please check attached images for the different behaviour. It is intermittent behaviour. From my observattion it occurs when you keep site open for long time & try to access the page gain. We need to resolve this issue immediately

Thanks.
Dimo
Telerik team
 answered on 27 Aug 2010
1 answer
187 views
What do I miss?

I cant get the Language="es-MX" working in FIleExplorer. I configure it, but still the english language is appearing.
Dobromir
Telerik team
 answered on 27 Aug 2010
2 answers
144 views
I have my group by column set to 150px on my scheduer but some of our client have very large names.  If I remove this setting from the css file

*+html

 

 

.RadScheduler .rsContent .rsVerticalHeaderTable th div { width: 150px;} /*IE7*/

 

I can see all of the names just fine but they take up to much space.  Is there a way to make the text wrap down to the next line?
Timothy Kruszewski
Top achievements
Rank 1
 answered on 27 Aug 2010
3 answers
258 views
Hi,

I've tried out creating new skins using RadStyleSheetManager by following the url:


It was working fine as i followed the url.

Later i wanted to restructure the folders available in my project based on the skin names. So i moved all the files to a separate folder TelerikSkins and moved all the images, cs file into that. But when i moved the css file in to that folder and modified the webresource as in the code snippet below, the stylesheet is not applied in the web page!

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Web.UI; 
 
[assembly: WebResource("TelerikCustomSkins.TelerikSkins.TelerikSkinForComboBox.css", "text/css")] 
namespace TelerikCustomSkins 
{ 
   public class TelerikSkin 
   { 
   } 
} 

But when it is in the root folder of the project, it is working fine. Otherwise nothing happend!

Please let me know how to mark a css file as Web Embedded resource when it is inside a folder.

Thanks
Stuart Wachsberg
Top achievements
Rank 1
 answered on 27 Aug 2010
1 answer
136 views
Hi All

We have a simple task to achieve but are struggling and wondered if anyone has any pointers...

Basically issue is we have Grid which display 'Alerts' to our users which looks like.......

ID     | Alert Name         | Created         | Status
100    Order Created    12/12/2010     On Order

In the database we have an Alerts table and Alert Status table. The Alert table contains all of the above fields except for the Status which is an reference to the Alert Status table. So in Alerts we have a StatusRef(int) that links to AlertStatus to display the status name.

What we need to achieve is when Edit is selected the only field that can edited is the Status field which should contain a drop down list which loads all of the Statuses - ID / Name from the db - to allow the user to change the status.

We have managed to do this so when a user wants to change the status a drop down is provided and contains the values we need but..........

1> How do I link up the drop down in edit mode to the Status field so that when Update is selected the update is performed.
2> How do I select the Value rather than the Text from the drop down

So far we have......

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None"
         AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" AllowAutomaticDeletes="true"
         AllowAutomaticUpdates="true">
         <MasterTableView AutoGenerateColumns="False" DataKeyNames="AlertID" DataSourceID="SqlDataSource1"
             EditMode="EditForms">
             <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
             <RowIndicatorColumn>
                 <HeaderStyle Width="20px"></HeaderStyle>
             </RowIndicatorColumn>
             <ExpandCollapseColumn>
                 <HeaderStyle Width="20px"></HeaderStyle>
             </ExpandCollapseColumn>
             <Columns>
                 <telerik:GridBoundColumn DataField="AlertID" DataType="System.Int32" HeaderText="ID"
                     ReadOnly="True" SortExpression="AlertID" UniqueName="AlertID">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="AlertTitle" HeaderText="Alert" SortExpression="AlertTitle"
                     UniqueName="AlertTitle" ReadOnly="true">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="AlertTo" DataType="System.Int32" HeaderText="AlertTo"
                     SortExpression="AlertTo" UniqueName="AlertTo" Visible="false" ReadOnly="true">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="AlertCreated" DataType="System.DateTime" HeaderText="AlertCreated"
                     SortExpression="AlertCreated" UniqueName="AlertCreated" ReadOnly="true">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="AlertStatus" HeaderText="AlertStatus" SortExpression="AlertStatus"
                     UniqueName="AlertStatus" Visible="false" DataType="System.Int32">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="AlertFilter" HeaderText="AlertFilter" SortExpression="AlertFilter"
                     UniqueName="AlertFilter" Visible="false" ReadOnly="true">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="AlertStatusName" HeaderText="AlertStatusName"
                     SortExpression="AlertStatusName" UniqueName="AlertStatusName" ReadOnly="true">
                 </telerik:GridBoundColumn>
                 <telerik:GridHyperLinkColumn UniqueName="AlertActionLink" Target="_parent" HeaderText="Action"
                     Text="Action" DataNavigateUrlFields="AlertActionLink">
                 </telerik:GridHyperLinkColumn>
             </Columns>
             <EditFormSettings EditFormType="Template">
                 <FormTemplate>
                     <br />
                     <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2"
                         DataTextField="AlertStatusName" DataValueField="AlertStatusID">
                     </asp:DropDownList>
                     <br />
                     <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click" />
                 </FormTemplate>
             </EditFormSettings>
         </MasterTableView>
     </telerik:RadGrid>
     <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:IFMWEBDBADMIN2 %>"
         SelectCommand="SELECT [AlertStatusID], [AlertStatusName] FROM [IFM_Alert_Status]">
     </asp:SqlDataSource>
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFMWEBDBADMIN2 %>"
         SelectCommand="IFM_Alerts_ViewAll" DeleteCommand="IFM_Alerts_ViewAll_Delete"
         DeleteCommandType="StoredProcedure" SelectCommandType="StoredProcedure" UpdateCommand="IFM_Alerts_ViewAll_Update"
         UpdateCommandType="StoredProcedure">
         <DeleteParameters>
             <asp:Parameter Name="AlertID" Type="Int32" />
         </DeleteParameters>
         <SelectParameters>
             <asp:SessionParameter Name="UserID" SessionField="LoggedInUsersUserID" Type="Int32"
                 DefaultValue="999900" />
         </SelectParameters>
         <UpdateParameters>
             <asp:Parameter Name="AlertID" Type="Int32" />
             <asp:Parameter Name="AlertStatus" Type="Int32" />
         </UpdateParameters>
     </asp:SqlDataSource>

Any help is greatly appreciated as I am a bit stuck at the moment :)

All the best
Mira
Telerik team
 answered on 27 Aug 2010
1 answer
214 views
I'm trying to be able to hide and show a RadScheduler on demand. I'm fairly sure this is a client side scripting question.

The first problem I was having was hiding the scheduler on page load. It would hide ok, but when shown, it would be empty. I solved this by calling repaint() after showing its wrapper div.

Now the problem is even though its showing ok, appointments cannot be dragged and dropped.

Specifically, if the RadScheduler is hidden, and an Ajax call is made which rebinds the data, lets say an appointment is moved back two weeks, when the wrapper div is shown and the scheduler is repainted, it does show the appointment on the correct new date, however it is no longer dragable.

Is there another client side method I can call that will reenable dragging support?

Thanks,

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
<script type="text/javascript">
    var rsEvents = null;
    var rgEvents = null;
    var rsPastEvents = null;
    var rgPastEvents = null;
    function onResponseEnd(sender, args) {
        if (args.EventTarget.replace(/\$/g, '_') == rgEvents.ClientID || args.EventTarget == rgPastEvents.ClientID) {
            $('#schedEvents').data('nr', true);
            $('#schedPastEvents').data('nr', true);
        }
    }
    $(document).ready(function () {
        $('#evtCalBtn').click(function () {
            $('#schedEvents').toggle('blind', {}, 500, null);
            if ($('#schedEvents').data('nr') == true) {
                rsEvents.repaint();
                rsEvents.rebind();
            }
        });
        $('#pastEvtCalBtn').click(function () {
            $('#schedPastEvents').toggle('blind', {}, 500, null);
            if ($('#schedPastEvents').data('nr') == true) {
                rsPastEvents.repaint();
                rsEvents.rebind();
            }
        });
    });
 
    $(window).load(function () {
        $('#schedEvents').hide();
        $('#schedPastEvents').hide();
 
        rsEvents = $find('<%= rsEvents.ClientID %>');
        rgEvents = $find('<%= rgEvents.ClientID %>');
        rsPastEvents = $find('<%= rsPastEvents.ClientID %>');
        rgPastEvents = $find('<%= rgPastEvents.ClientID %>');
        $('#schedEvents').data('nr', false);
        $('#schedPastEvents').data('nr', false);
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" Runat="Server">
 
<div>
    <div class="acnt">
    <p>Upcoming Events <span id="evtCalBtn" class="viewCalender">(View Calendar)</span></p>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgEvents">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rsEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rgPastEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rsPastEvents" UpdatePanelHeight="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rsEvents">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rgPastEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rsPastEvents" UpdatePanelHeight="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rgPastEvents">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rsEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rsPastEvents" UpdatePanelHeight="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rsPastEvents">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rsEvents" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="rgPastEvents" UpdatePanelHeight="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <ClientEvents OnResponseEnd="onResponseEnd" />
        </telerik:RadAjaxManager>  
            <telerik:RadGrid ID="rgEvents" runat="server" AllowSorting="True"
                    AutoGenerateColumns="False" DataSourceID="sqldsEvents" GridLines="None"
                    Skin="Windows7" onitemcommand="rgEvents_ItemCommand" AllowPaging="True">
                <MasterTableView DataKeyNames="EventID" DataSourceID="sqldsEvents">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                    <Columns>
                        <telerik:GridBoundColumn DataField="EventID" DataType="System.Int32"
                            HeaderText="EventID" ReadOnly="True" SortExpression="EventID"
                            UniqueName="EventID" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="StartDT" DataFormatString="{0:MM-dd-yyyy}"
                            DataType="System.DateTime" HeaderText="StartDT" SortExpression="Date"
                            UniqueName="StartDT">
                            <HeaderStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EventName" HeaderText="EventName"
                            SortExpression="Event" UniqueName="EventName">
                            <HeaderStyle Width="100%" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Seats" DataType="System.Int32"
                            HeaderText="Seats" SortExpression="# Seats" UniqueName="Seats">
                            <HeaderStyle Width="40px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SeatsLeft" DataType="System.Int32"
                            HeaderText="SeatsLeft" ReadOnly="True" SortExpression="# Left"
                            UniqueName="SeatsLeft">
                            <HeaderStyle Width="40px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Cost" DataFormatString="{0:$#,0.00}"
                            DataType="System.Decimal" HeaderText="Cost" SortExpression="Cost"
                            UniqueName="Cost">
                            <HeaderStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridHyperLinkColumn AllowFiltering="False" Groupable="False"
                            Reorderable="False" Resizable="False" ShowSortIcon="False" Target="_blank"
                            Text="View" UniqueName="colView" DataNavigateUrlFields="EventID"
                            DataNavigateUrlFormatString="../../events.aspx?id={0}">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridHyperLinkColumn>
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete"
                            UniqueName="colDelete"
                            ConfirmText="Are you sure you want to cancel this event? You should send an email notiying them of the cancelation before continuing."
                            ConfirmTitle="Question">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Email" Text="Email"
                            UniqueName="colEmail">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Copy" Text="Copy"
                            UniqueName="colCopy">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Manage" Text="Manage"
                            UniqueName="colManage">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
 
        <div id="schedEvents" style="display: block">
            <telerik:RadScheduler runat="server" ID="rsEvents" Height="580px" Width="100%"
                SelectedView="MonthView" ShowViewTabs="False"
            ShowNavigationPane="True" DataEndField="EndDT" DataKeyField="EventID"
            DataSourceID="sqldsEvents" DataStartField="StartDT"
            DataSubjectField="EventName" Skin="Windows7"
            onappointmentupdate="rsEvents_AppointmentUpdate"
            EnableAdvancedForm="False"
            onappointmentdelete="rsEvents_AppointmentDelete" Localization-ConfirmDeleteTitle="Question"
            Localization-ConfirmDeleteText="Are you sure you want to cancel this event? You should send an email notiying them of the cancelation before continuing."
             
                onappointmentcontextmenuitemclicked="rsEvents_AppointmentContextMenuItemClicked"
                AllowInsert="False"
                StartEditingInAdvancedForm="False"
                ontimeslotcontextmenuitemclicked="rsEvents_TimeSlotContextMenuItemClicked">
            <AdvancedForm Modal="true" Enabled="False" />
             
<Localization ConfirmDeleteTitle="Question" ConfirmDeleteText="Are you sure you want to cancel this event? You should send an email notiying them of the cancelation before continuing."></Localization>
 
            <TimeSlotContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenus>
                    <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu1" runat="server">
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="View" Value="View">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Delete" Value="CommandDelete">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Email" Value="Email">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Copy" Value="Copy">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Manage" Value="Manage">
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadSchedulerContextMenu>
                    <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu2" runat="server">
                    </telerik:RadSchedulerContextMenu>
                </AppointmentContextMenus>
 
            </telerik:RadScheduler>
        </div>
    <br />
    <p>Templates</p>
    <asp:UpdatePanel ID="upTemplates" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            <telerik:RadGrid ID="rgTemplates" runat="server" AllowSorting="True"
                    AutoGenerateColumns="False" DataSourceID="sqldsTemplates" GridLines="None"
                    Skin="Windows7" onitemcommand="rgTemplates_ItemCommand" AllowPaging="True">
                <MasterTableView DataKeyNames="EventID" DataSourceID="sqldsTemplates">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                    <Columns>
                        <telerik:GridBoundColumn DataField="EventID" DataType="System.Int32"
                            HeaderText="EventID" ReadOnly="True" SortExpression="EventID"
                            UniqueName="EventID" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EventName" HeaderText="EventName"
                            SortExpression="Event" UniqueName="EventName">
                            <HeaderStyle Width="100%" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Seats" DataType="System.Int32"
                            HeaderText="Seats" SortExpression="# Seats" UniqueName="Seats">
                            <HeaderStyle Width="40px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Cost" DataFormatString="{0:$#,0.00}"
                            DataType="System.Decimal" HeaderText="Cost" SortExpression="Cost"
                            UniqueName="Cost">
                            <HeaderStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete"
                            UniqueName="colDelete"
                            ConfirmText="Are you sure you want to cancel this event? You should send an email notiying them of the cancelation before continuing."
                            ConfirmTitle="Question">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Copy" Text="Copy"
                            UniqueName="colCopy">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Manage" Text="Manage"
                            UniqueName="colManage">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>  
        </ContentTemplate>
        </asp:UpdatePanel>
    <br />
    <p>Past Events <span id="pastEvtCalBtn" class="viewCalender">(View Calendar)</span></p>
                <telerik:RadGrid ID="rgPastEvents" runat="server" AllowSorting="True"
                    AutoGenerateColumns="False" DataSourceID="sqldsPastEvents" GridLines="None"
                    Skin="Windows7" onitemcommand="rgPastEvents_ItemCommand" AllowPaging="True">
                <MasterTableView DataKeyNames="EventID" DataSourceID="sqldsPastEvents">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                    <Columns>
                        <telerik:GridBoundColumn DataField="EventID" DataType="System.Int32"
                            HeaderText="EventID" ReadOnly="True" SortExpression="EventID"
                            UniqueName="EventID" Visible="False">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="StartDT" DataFormatString="{0:MM-dd-yyyy}"
                            DataType="System.DateTime" HeaderText="StartDT" SortExpression="Date"
                            UniqueName="StartDT">
                            <HeaderStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="EventName" HeaderText="EventName"
                            SortExpression="Event" UniqueName="EventName">
                            <HeaderStyle Width="100%" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Seats" DataType="System.Int32"
                            HeaderText="Seats" SortExpression="# Seats" UniqueName="Seats">
                            <HeaderStyle Width="40px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SeatsLeft" DataType="System.Int32"
                            HeaderText="SeatsLeft" ReadOnly="True" SortExpression="# Left"
                            UniqueName="SeatsLeft">
                            <HeaderStyle Width="40px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Cost" DataFormatString="{0:$#,0.00}"
                            DataType="System.Decimal" HeaderText="Cost" SortExpression="Cost"
                            UniqueName="Cost">
                            <HeaderStyle Width="60px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridHyperLinkColumn AllowFiltering="False" Groupable="False"
                            Reorderable="False" Resizable="False" ShowSortIcon="False" Target="_blank"
                            Text="View" UniqueName="colView" DataNavigateUrlFields="EventID"
                            DataNavigateUrlFormatString="../../events.aspx?id={0}">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridHyperLinkColumn>
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete"
                            UniqueName="colDelete"
                            ConfirmText="Are you sure you want to cancel this event? You should send an email notiying them of the cancelation before continuing."
                            ConfirmTitle="Question">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Email" Text="Email"
                            UniqueName="colEmail">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Copy" Text="Copy"
                            UniqueName="colCopy">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                        <telerik:GridButtonColumn CommandName="Manage" Text="Manage"
                            UniqueName="colManage">
                            <ItemStyle Font-Size="7pt" />
                        </telerik:GridButtonColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>  
    <div id="schedPastEvents" style="display: block">
            <telerik:RadScheduler runat="server" ID="rsPastEvents" Height="580px" Width="100%"
                SelectedView="MonthView" ShowViewTabs="False"
            ShowNavigationPane="True" DataEndField="EndDT" DataKeyField="EventID"
            DataSourceID="sqldsPastEvents" DataStartField="StartDT"
            DataSubjectField="EventName" Skin="Windows7"
            onappointmentupdate="rsPastEvents_AppointmentUpdate"
            EnableAdvancedForm="False"
            onappointmentdelete="rsPastEvents_AppointmentDelete" Localization-ConfirmDeleteTitle="Question"
            Localization-ConfirmDeleteText="Are you sure you want to cancel this event? You should send an email notiying them of the cancelation before continuing."
             
                onappointmentcontextmenuitemclicked="rsPastEvents_AppointmentContextMenuItemClicked"
                AllowInsert="False"
                StartEditingInAdvancedForm="False"
                ontimeslotcontextmenuitemclicked="rsPastEvents_TimeSlotContextMenuItemClicked">
            <AdvancedForm Modal="true" Enabled="False" />
             
<Localization ConfirmDeleteTitle="Question" ConfirmDeleteText="Are you sure you want to cancel this event? You should send an email notiying them of the cancelation before continuing."></Localization>
 
            <TimeSlotContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenus>
                    <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu3" runat="server">
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="View" Value="View">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Delete" Value="CommandDelete">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Email" Value="Email">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Copy" Value="Copy">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Manage" Value="Manage">
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadSchedulerContextMenu>
                    <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu4" runat="server">
                    </telerik:RadSchedulerContextMenu>
                </AppointmentContextMenus>
 
            </telerik:RadScheduler>
        </div>
 
    </div>
</div>
Peter
Telerik team
 answered on 27 Aug 2010
1 answer
75 views
Hi All,

I have used PanelBar in my application to display some static text and i'm binding the panelbar from xml. This is working very much fine as long as the text was small. If the text width is more than the panelbar width, instead of wrapping the text it was truncating. Should i have to enable any op'n to wrap the text..


Regards,
sagi.
Kalina
Telerik team
 answered on 27 Aug 2010
7 answers
308 views

Good Afternoon,

I am attempting to use RadAjax to build several SharePoint WebParts that each reach out to remote datasources, databind then display thier data. I am encountering an issue displaying individual loading panels while these controls perform thier initial load (This can be lengthy, a few seconds apiece).

The behviour I am looking for is to have individual RadAjaxUpdatePanels displayed while each control is loading. I have followed the example outlined here (http://www.telerik.com/help/aspnet-ajax/ajxshowloadingpaneloninitialpageload.html) and this works quite well, provided that not more than a single instance of the webpart appears on a given page or any other webpart that impliments this solution.

Attached to this solution is a simplified version of the WebPart logic that substitudes the databinding with a
System.Threading.Thread.Sleep call to simulate the call to an external resource.

When more than one instance of the same part that impliments this login is present on a page, only the call back seems to occure, by this I mean that at the same instance (after the prescribbed delay) the callback renders both webparts simultainiously.

When instances of different WebParts implimenting this logic are on a given page, only the second callback appears to occure and only the last webpart is rendered after the prescribed delay.

I hope that this is enough to make the issue clear enough to address. Below is the source of the WebPart in it's entirety;

MyWeek WebPart Code

MyWeekPart.cs

using System;  
using System.Text;  
using System.Collections.Generic;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using Microsoft.Practices.SPG.Common.Logging;  
using Microsoft.Practices.SPG.Common.ServiceLocation;  
using Telerik.Web.UI;  
using NipissingU.Portal.Common.ExceptionHandling;  
using NipissingU.Portal.Common.Entities;  
using NipissingU.Portal.Colleague.Repositories;  
using NipissingU.Portal.Common.Utility;  
 
namespace NipissingU.Portal.WebPart.MyWeek  
{  
    public class MyWeekPart : Microsoft.SharePoint.WebPartPages.WebPart  
    {
        #region Fields...  
        private Control myWeekControl;  
        private Panel Panel1;  
        private Panel Panel2;  
        private RadAjaxLoadingPanel RadAjaxLoadingPanel1;
        #endregion  
 
        #region Properties...  
        IErrorVisualizer ErrorVisualizer { get; set; }
        #endregion  
 
 
        #region Overridden Methods...  
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
 
            ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);  
            if (scriptManager == null)  
            {  
                scriptManager = new RadScriptManager();  
                this.Page.Form.Controls.AddAt(0, scriptManager);  
            }  
 
            Page.ClientScript.RegisterStartupScript(typeof(MyWeekPart), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);  
            if (this.Page.Form != null)  
            {  
                string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];  
                if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")  
                {  
                    this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";  
                }  
            }  
        }  
 
        protected override void OnLoad(EventArgs e)  
        {  
            base.OnLoad(e);  
   
            ErrorVisualizer errorVisualizer = new ErrorVisualizer();  
            this.ErrorVisualizer = errorVisualizer;  
 
            try 
            {  
                this.Controls.Add(errorVisualizer);  
 
                // Load the UserControl Template from the /TEMPLATE/CONTROLTEMPLATES directory.  
                myWeekControl = Page.LoadControl("/_controltemplates/NipissingU/MyWeekControl.ascx");  
 
                // Add the Loaded control to the WebParts Control collection. This is important to   
                // establish the Child Control Events!  
                errorVisualizer.Controls.Add(myWeekControl);  
 
                Panel1 = myWeekControl.FindControl("Panel1") as Panel;  
                Panel2 = Panel1.FindControl("Panel2") as Panel;  
                RadAjaxLoadingPanel1 = myWeekControl.FindControl("RadAjaxLoadingPanel1") as RadAjaxLoadingPanel;  
 
                RadAjaxManager AjaxManager1 = RadAjaxManager.GetCurrent(this.Page);  
                if (AjaxManager1 == null)  
                {  
                    AjaxManager1 = new RadAjaxManager();  
                    AjaxManager1.ID = "RadAjaxManager1";  
                    Controls.Add(AjaxManager1);  
                    this.Page.Items.Add(typeof(RadAjaxManager), AjaxManager1);  
                }  
 
                AjaxManager1.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(MyWeekPart_AjaxRequest);  
            }  
            catch (Exception ex)  
            {  
                new ViewExceptionHandler().HandleViewException(ex, this.ErrorVisualizer,  
                   Constants.FriendlyError);  
            }  
        }  
 
        protected override void OnPreRender(EventArgs e)  
        {  
            base.OnPreRender(e);  
 
            if (!this.CheckForWebPartDisplayMode(WebPartManager.BrowseDisplayMode))  
            {  
                new ViewExceptionHandler().ShowFunctionalErrorMessage(Constants.DisplayModeError, this.ErrorVisualizer);  
            }  
        }
        #endregion  
 
        #region Events...  
        protected void MyWeekPart_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)  
        {  
            try 
            {  
                if (e.Argument == "MyWeekLoad")  
                {  
                    System.Threading.Thread.Sleep(2000);  
                    Panel2.Visible = true;  
 
                    Label Label2 = new Label();  
                    Label2.Text = e.Argument;  
                    Panel2.Controls.Add(Label2);  
                }  
            }  
            catch (Exception ex)  
            {  
                  
            }  
        }
        #endregion  
 
        #region Private Methods...  
        protected bool CheckForWebPartDisplayMode(WebPartDisplayMode mode)  
        {  
            bool flag = false;  
            if ((base.WebPartManager != null) && (base.WebPartManager.DisplayMode == mode))  
            {  
                flag = true;  
            }  
            return flag;  
        }
        #endregion  
    }  
}  
 

Constants.cs

using System;  
 
namespace NipissingU.Portal.WebPart.MyWeek  
{  
    public static class Constants  
    {  
        public static string FriendlyError = "My Week is currently unavailable.  Please try again later.";  
        public static string DisplayModeError = "The page is in edit mode.  To show the contents of this web part, close the toolbar or refresh the web part.";  
    }  
}  
 

MyWeekControl.aspx

<%@ Control Language="C#" AutoEventWireup="true" Inherits="NipissingU.Portal.WebPart.MyWeek.MyWeekControl, NipissingU.Portal.WebPart.MyWeek, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fc876b2c4bf21e29" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %> 
 
<telerik:RadScriptBlock ID="RadScriptBlock1"  runat="server">  
    <script type="text/javascript">     
        function addLoadEvent(func)   
        {  
            var oldonload = window.onload;  
            if (typeof window.onload != 'function')   
            {  
                window.onload = func;  
            }   
            else   
            {  
                window.onload = function() {  
                    if (oldonload)   
                    {  
                        oldonload();  
                    }  
                    func();  
                }  
            }  
        }  
           
        function MyWeek_OnLoad()  
        {  
            setTimeout( function(){ window["<%= RadAjaxManager.GetCurrent(this.Page).ClientID %>"].ajaxRequest("MyWeekLoad"); }, 50);  
        }  
          
        addLoadEvent(MyWeek_OnLoad);  
    </script>   
</telerik:RadScriptBlock> 
 
<style type="text/css">  
    .module1  
    {  
        background-color: #dff3ff;  
        border: 1px solid #c6e1f2;  
    }  
</style> 
 
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">  
    <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Panel1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
 
<fieldset class="module1">  
    <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Height="150px">  
        <asp:Panel ID="Panel2" runat="server" Visible="False">  
            <asp:Button ID="Button1" runat="server" Text="Click to see the loading image" OnClick="Button1_Click" 
            Style="margin-top: 15px; margin-left: 15px" /> 
            <br /> 
            <asp:Label ID="Label1" runat="server" Text="Before Ajax..."></asp:Label> 
        </asp:Panel> 
    </asp:Panel> 
</fieldset> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">  
    <div align="center" class="nu-loadingpanel-container">  
        <div class="dt-bigthrobber">&nbsp;</div>      
        <div>Loading...</div> 
    </div> 
</telerik:RadAjaxLoadingPanel> 
 
 

MyWeekControl.cs

using System;  
using System.Data;  
using System.Configuration;  
using System.Collections;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
using Telerik.Web.UI;  
 
namespace NipissingU.Portal.WebPart.MyWeek  
{  
    public partial class MyWeekControl : System.Web.UI.UserControl  
    {
        #region Fields...  
        protected Label Label1;  
        protected Panel Panel1;  
        protected Button Button1;  
        protected RadAjaxLoadingPanel RadAjaxLoadingPanel1;
        #endregion  
 
        protected void Button1_Click(object sender, EventArgs e)  
        {  
            System.Threading.Thread.Sleep(2000);  
            Label1.Text = DateTime.Now.ToLongTimeString();  
        }  
    }  
}  
 

Christian

Pavlina
Telerik team
 answered on 27 Aug 2010
3 answers
123 views
How can I configure the upload option, so when the user try to upload a file it only appears one fileupload item instead three as the default option?
Aaron C
Top achievements
Rank 1
 answered on 27 Aug 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?