Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
125 views
Hi,
I have a calendar made up of usercontrols inside a table, each of the controls are added as targets to the RadToolTipManager (this manager is cleared of targets before adding new ones).

Everything works fine using the load on demand except I have 2 linkbuttons to change the month of the calendar. These have not been added as targets but on selecting them the AjaxUpdate event is fired first.

I have read the blogs and posts regarding ToolTipManager but can't seem to stop this unwantred event from happening. Below is the code for the tooltipmanager:
<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"   
        Position=BottomCenter   
        ContentScrolling=Auto   
        AutoTooltipify="false"   
        HideDelay=5000 
        Animation="Fade"   
        Skin="Office2007"   
        Width="450px"   
        Height="200px"   
        ManualClose=false   
        OnAjaxUpdate="RadToolTipManager1_AjaxUpdate"   
        OnClientBeforeShow="tooltipPosition" 
        Style="font-size: 18px; text-align: center; font-family: Arial;">  
        </telerik:RadToolTipManager> 

 

 


with the javascript for the OnClientBeforeShow being:

 

    function tooltipPosition(sender, args) {  
        sender._popupBehavior.set_keepInScreenBounds(false);  
    }  
 

The version is 2009.1.311.35.

Any suggestions?

Regards
Roger

 

 

Svetlina Anati
Telerik team
 answered on 16 Dec 2009
1 answer
63 views
Hello,

I placed a RadGrid on a page that is being refreshed by an ajax timer.
When the user wants to scroll the grid I disable the timer to prevent unexpected behaviour.

Therefore I placed a div arround the grid with an OnMouseDown event attached.
In that event I disable the timer and wire up an OnMouseUp event for document.body.
This works fine in Firefox but in IE the MouseUp event will not be fired when I click on the scrollbar of the grid.
All other locations seems to work.

How can I disable the ajax timer from script when the user scrolls the grid and reenable the timer when the user stops scrolling?

Javascript

function Timer_Disable() {
 document.body.onmouseup = Timer_Enable;

 //   disable the Timer so we don't refresh the page
 //   while the user is entering the data
 var timer = $find(timerId);
 timer._stopTimer();

 window.status = "Refresh disabled during scrolling operation.";
}

function Timer_Enable() {
 document.body.onmouseup = null;

 //   re-enable the Timer
 var timer = $find(timerId);
 timer._startTimer();

 window.status = "";
}   


Code behind

divTimer.Attributes.Add(

"OnMouseDown", "Timer_Disable();");

 



Regards,

Jeroen
Dimo
Telerik team
 answered on 16 Dec 2009
1 answer
201 views
Hello All,              
             We have used "autosize=true" for radwindow, but the radwindow is not getting autosized after the content on the page changes instead the horizontal and vertical scrollbars are coming. We are using AjaxPanel.
As you have specified that "The size of the content page is taken in window.onload. This means that if you change the size of the content page with Ajax, the RadWindow will not resize after the new content is displayed.".
 Can you please tell us know where the problem is?
           We have also tried with the following code on the Page_Load(). It is helping in autosizing, but on the continuous button clicks the size of the  rad window grows horizontally till the end of the browser reaches.

  #region RadWindow AutoSize
        public void EnableRadWindowAutoSize(RadAjaxPanel radAjaxPanel, Label messageLabel)
        {
            radAjaxPanel.Controls.Add(SetRadWindowSizeRadScriptBlock(messageLabel));
        }
        public void EnableRadWindowAutoSize(RadAjaxManager radAjaxManager, Label messageLabel)
        {
            radAjaxManager.Controls.Add(SetRadWindowSizeRadScriptBlock(messageLabel));
        }
        private RadScriptBlock SetRadWindowSizeRadScriptBlock(Label messageLabel)
        {
            RadScriptBlock radScriptBlock = new RadScriptBlock();
            System.Text.StringBuilder scriptContent = new System.Text.StringBuilder();
            scriptContent.Append(@"
             <script type='text/javascript'>  
                function SetRadWindowSize(messageLabelID)
                {
                    try
                   {
                    var messageLabel = document.getElementById(messageLabelID);
                    if (messageLabel)
                      {                
                        if (messageLabel.innerHTML.length > 0)
                        {
                         var oWindow = null;
                         if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                         else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)
                         oWindow.autoSize();
                        }
                     }
                  }
                  catch (ex){}
              }");
            scriptContent.Append(String.Format("SetRadWindowSize('{0}')</script>", messageLabel.ClientID));
            radScriptBlock.Controls.Add(new LiteralControl(scriptContent.ToString()));
            return radScriptBlock;
        }
   #endregion

Please let us know if you have any solution.
Thanks,
Svetlina Anati
Telerik team
 answered on 16 Dec 2009
1 answer
79 views
Hello
i m using Radgrid,skin is Sunset,
now when in my page vertical scroll that time corner of vertical scroll is empty means no style there here i attached the screen shot and i m using Mozila Browser

Pavlina
Telerik team
 answered on 16 Dec 2009
1 answer
189 views
Dear Telerik team,

Firstly, appologize my weak english.
I am using RadScheduler in ASP.NET MVC (WebService binding mode), but having hard time with customization. Can You please answer me these questions?
I know, that RadScheduler was developed mainly for ASP.NET , but I need to get it to work as much as possible in ASP.NET MVC.

1) Is it possible to use Ajax Loading panel? I had a go to get it to work, but without success
2) I would like to allow user create an appoiment with mouse only. User should have the opportunity to click on start time and drag the appointment to the end time. I have success only with creating an appointment with given duration (and dragging after creation).

<telerik:RadCodeBlock runat="server" ID="InitialScriptCodeBlock1">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptLocalization="true" 
            EnableScriptGlobalization="true" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
            <ClientEvents /> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Panel1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Office2007" 
             BackImageUrl="~/Content/Images/loadingAnimation.gif" BackgroundPosition="Center" /> 
               
        <telerik:RadAjaxPanel ID="Panel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">  
            <telerik:RadScheduler runat="server" ID="RadScheduler1" AllowDelete="false" AllowEdit="true" 
                AllowInsert="false" MinutesPerRow="15" StartEditingInAdvancedForm="false" StartInsertingInAdvancedForm="false" 
                OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick" OnClientTimeSlotClick="OnClientTimeSlotClick" 
                OnClientAppointmentDeleting="OnClientAppointmentDeleting" OnClientAppointmentDataBound="OnClientAppointmentDataBound" 
                Height="900px" OnClientAppointmentEditing="OnClientAppointmentEditing" OnClientAppointmentContextMenuItemClicked="appointmentContextMenuItemClicked" 
                SelectedView="WeekView" DayHeaderDateFormat="dddd, dd MMMM yyyy" HoursPanelTimeFormat="HH:mm">  
                <AppointmentContextMenus> 
                    <%--The appointment context menu interaction is handled on the client--%> 
                    <%--See the JavaScript code above--%> 
                    <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">  
                        <Items> 
                            <telerik:RadMenuItem Text="Export iCalendar" Value="GenerateVCal" ImageUrl="~/Content/Images/Icons/iCalendar16.png" /> 
                            <telerik:RadMenuItem IsSeparator="True" /> 
                            <telerik:RadMenuItem Text="Delete" Value="CommandDelete" ImageUrl="~/Content/Images/DataEditing/Delete.gif" 
                                Enabled="True" /> 
                        </Items> 
                    </telerik:RadSchedulerContextMenu> 
                </AppointmentContextMenus> 
                <TimelineView GroupBy="Calendar" GroupingDirection="Vertical" /> 
                <AdvancedForm Enabled="false" EnableResourceEditing="false" /> 
                <WebServiceSettings Path="~/Models/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" /> 
            </telerik:RadScheduler> 
        </telerik:RadAjaxPanel> 
    </telerik:RadCodeBlock> 



Thank You Jan
Georgi Krustev
Telerik team
 answered on 16 Dec 2009
6 answers
161 views
I have radpanelbar defined in my code in front with an embedded user control.

<telerik:RadPanelBar ID="RadPanelBar1" runat="server">  
    <Items runat="server">  
        <telerik:RadPanelItem ID="RadPanelItem1" runat="server">  
            <uc:ComponentDescriptionPurpose ID="ComponentDescriptionPurpose" runat="server" /> 
        </telerik:RadPanelItem> 
    </Items> 
</telerik:RadPanelBar> 

In the code-behind, I need to access a function within the user control. I tried below to find it, but it doesn't work.
How do I find it within the panelbar so I can access its functions?
        Dim ComponentDescriptionPurpose As Telerik.Web.UI.RadPanelBar = DirectCast(Page.FindControl("ComponentDescriptionPurpose"), Telerik.Web.UI.RadPanelBar)  
 
        ComponentDescriptionPurpose.LoadByOrm(idKey) 

Thanks.

Veselin Vasilev
Telerik team
 answered on 16 Dec 2009
1 answer
106 views
Hi, All

I want to export to excel at CardView
  (Grid > LayOut> Cardview)

Whe I was export to excel I used this code at C#

protected void Button1_Click(object sender, EventArgs e)
    {
        RadGrid1.MasterTableView.ExportToExcel();
    }

How can I export at cardview

GOD regard You
Daniel
Telerik team
 answered on 16 Dec 2009
3 answers
156 views
Tried 2009 Q3 Official and 2009.3.1201.35.
I am using declarative datasources.  
It works fine with HierarchyLoadMode="Client" but this is too slow prefetching all the child records since I have 2 lower levels.

When setting it to ServerOnDemand or ServerBind and I click on expand, it seems to go back to the server to do something (ajax loading template shows) but then nothing happens on the front-end.   Nothing is expanded.

I did NOT turn off EnableViewState on the grid.  
All connection strings for datasources to assigned in Page_Load.   Again this works with "Client" mode...   Help??

  <telerik:RadGrid EnableViewState="true" ID="RadGrid1" DataSourceID="srcMyWorklist" GridLines="None" runat="server"  
            AllowSorting="true" AllowFilteringByColumn="true"  
            AllowPaging="true" PageSize="20" AutoGenerateColumns="false" AllowAutomaticUpdates="False" Skin="Web20"  
            GroupingSettings-CaseSensitive="false" EnableLinqExpressions="false" 
            ShowGroupPanel="True" ShowHeader="true" ShowHeadersWhenNoRecords="true" AllowMultiRowEdit="false"> 
       
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="false"> 
                <Selecting AllowRowSelect="True" /> 
                <ClientEvents OnFilterMenuShowing="filterMenuShowing"  /> 
                <Scrolling AllowScroll="False" UseStaticHeaders="True" /> 
            </ClientSettings> 
             
            <FilterMenu OnClientShown="MenuShowing" ExpandAnimation-Type="None" CollapseAnimation-Type="None" /> 
             
            <MasterTableView DataKeyNames="ID"        
                NoDetailRecordsText="No records matching criteria" ShowHeadersWhenNoRecords="true"  
                AllowAutomaticUpdates="false" CommandItemDisplay="None">                           
 
                <PagerStyle Position="TopAndBottom" Mode="NextPrevNumericAndAdvanced" /> 
 
                <DetailTables> 
                    <telerik:GridTableView AutoGenerateColumns="false" HierarchyLoadMode="ServerOnDemand"    
                        DataSourceID="srcActivity" AllowMultiRowSelection="False" OverrideDataSourceControlSorting="true" 
                        runat="server" CommandItemDisplay="None" ShowStatusBar="False" AllowSorting="false" AllowFilteringByColumn="False"  
                       Name="grdActivity" DataKeyNames="ProcInstID,ActInstID" Width="50%" ShowHeadersWhenNoRecords="false" BackColor="Gainsboro"> 
                        <ParentTableRelation> 
                            <telerik:GridRelationFields DetailKeyField="ProcInstID" MasterKeyField="ID" /> 
                        </ParentTableRelation>     
 
                        <DetailTables> 
                            <telerik:GridTableView AutoGenerateColumns="false" HierarchyLoadMode="ServerOnDemand"  
                                DataSourceID="srcActivityDest" AllowMultiRowSelection="False" OverrideDataSourceControlSorting="true" 
                                runat="server" CommandItemDisplay="None" ShowStatusBar="False" AllowSorting="false" AllowFilteringByColumn="False"  
                                NoDetailRecordsText="N/A" DataKeyNames="ProcInstID,ActInstID" 
                                Name="grdActivityDest" Width="80%" ShowHeadersWhenNoRecords="true" BackColor="Gainsboro"> 
                                <ParentTableRelation> 
                                    <telerik:GridRelationFields DetailKeyField="ProcInstID" MasterKeyField="ProcInstID" /> 
                                    <telerik:GridRelationFields DetailKeyField="ActInstID" MasterKeyField="ActInstID" /> 
                                </ParentTableRelation>                         
                                <Columns> 
                                    <telerik:GridBoundColumn SortExpression="ProcInstID" HeaderText="ProcInstID" DataType="System.Int32" 
                                        DataField="ProcInstID" UniqueName="ProcInstID" ReadOnly="true" Display="false"> 
                                    </telerik:GridBoundColumn> 
 
                                    <telerik:GridBoundColumn SortExpression="ActInstID" HeaderText="ActInstID" DataType="System.Int32" 
                                        DataField="ActInstID" UniqueName="ActInstID" ReadOnly="true" Display="false"> 
                                    </telerik:GridBoundColumn>                                     
                                                         
                                    <telerik:GridBoundColumn SortExpression="User" HeaderText="User" DataType="System.String" 
                                        DataField="User" UniqueName="User" ReadOnly="true"> 
                                    </telerik:GridBoundColumn> 
                                                   
                                    <telerik:GridBoundColumn SortExpression="status" HeaderText="Status" DataType="System.String" ItemStyle-Width="60px" 
                                        DataField="status" UniqueName="status" ReadOnly="true"> 
                                    </telerik:GridBoundColumn>  
                                     
                                    <telerik:GridBoundColumn SortExpression="FinishDate" HeaderText="Finish By" DataType="System.DateTime" ItemStyle-Width="150px" 
                                        DataField="FinishDate" UniqueName="FinishDate" ReadOnly="true"> 
                                    </telerik:GridBoundColumn>                         
                                </Columns> 
                             </telerik:GridTableView> 
                        </DetailTables>              
                                                         
                        <Columns> 
                            <telerik:GridBoundColumn SortExpression="ProcInstID" HeaderText="ProcInstID" DataType="System.Int32" 
                                DataField="ProcInstID" UniqueName="ProcInstID" ReadOnly="true" Display="false"> 
                            </telerik:GridBoundColumn> 
 
                            <telerik:GridBoundColumn SortExpression="ActInstID" HeaderText="ActInstID" DataType="System.Int32" 
                                DataField="ActInstID" UniqueName="ActInstID" ReadOnly="true" Display="false"> 
                            </telerik:GridBoundColumn>                             
                                                 
                            <telerik:GridBoundColumn SortExpression="name" HeaderText="Activity" DataType="System.String" 
                                DataField="name" UniqueName="name" ReadOnly="true"> 
                            </telerik:GridBoundColumn> 
                                           
                            <telerik:GridBoundColumn SortExpression="status" HeaderText="Status" DataType="System.String" ItemStyle-Width="60px" 
                                DataField="status" UniqueName="status" ReadOnly="true"> 
                            </telerik:GridBoundColumn>  
 
                            <telerik:GridBoundColumn SortExpression="StartDate" HeaderText="Start At" DataType="System.DateTime" ItemStyle-Width="150px" 
                                DataField="StartDate" UniqueName="StartDate" ReadOnly="true"> 
                            </telerik:GridBoundColumn> 
                             
                            <telerik:GridBoundColumn SortExpression="FinishDate" HeaderText="Finish By" DataType="System.DateTime" ItemStyle-Width="150px" 
                                DataField="FinishDate" UniqueName="FinishDate" ReadOnly="true"> 
                            </telerik:GridBoundColumn>                         
                        </Columns> 
                     </telerik:GridTableView> 
                </DetailTables>    
                 
                                                                     
                <Columns>                                        
                    <telerik:GridHyperLinkColumn Target="_blank" DataNavigateUrlFields="ID,ProcID" AllowFiltering="false" ItemStyle-Width="30px" Display="false" 
                    Text="View" DataNavigateUrlFormatString="FormMgr.asp?ProcID={1}&ProcInstID={0}"> 
                    </telerik:GridHyperLinkColumn> 
 
                    <telerik:GridHyperLinkColumn Target="_blank" DataNavigateUrlFields="Data" AllowFiltering="false" ItemStyle-Width="30px" Display="true" 
                    Text="Open" NavigateUrl="{0}"> 
                    </telerik:GridHyperLinkColumn>                  
                                                             
                    <telerik:GridTemplateColumn UniqueName="Status" HeaderText="Status" DataField="Status" SortExpression="Status" 
                            EditFormColumnIndex="0" > 
                        <ItemTemplate>  
                            <asp:Label ID="lblStatus" runat="server" Text='<%# Bind("Status") %>'></asp:Label>  
                        </ItemTemplate> 
                        <FilterTemplate> 
                            <telerik:RadComboBox runat="server" ID="StatusFilter" Width="90px"  
                                DataSource='<%# (New string() {"", "Active", "Completed", "Error"}) %>' 
                                CollapseAnimation-Type="None" ExpandAnimation-Type="None" 
                                SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("Status").CurrentFilterValue %>' 
                                OnClientSelectedIndexChanged="StatusIndexChanged" >                  
                            </telerik:RadComboBox> 
                             
                            <telerik:RadScriptBlock ID="StatusScriptBlock" runat="server"> 
                                <script type="text/javascript"> 
                                    function StatusIndexChanged(sender, args) { 
                                        var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>"); 
                                        tableView.filter("Status", args.get_item().get_value(), "EqualTo"); 
                                    } 
                                </script> 
                            </telerik:RadScriptBlock>                            
                        </FilterTemplate>       
                        <EditItemTemplate>                  
                           <asp:DropDownList ID="cboStatusType" runat="server" SelectedValue='<%# Bind("Status") %>' 
                                DataSource='<%# (New string() {"", "Active", "Completed", "Error" }) %>'  
                                Width="50px"> 
                           </asp:DropDownList>                                         
                        </EditItemTemplate>                                        
                    </telerik:GridTemplateColumn>                 
 
                    <telerik:GridBoundColumn HeaderText="Process" DataType="System.String"     
                        AutoPostBackOnFilter = "true" CurrentFilterFunction = "Contains" 
                        DataField="ProcessName" UniqueName="ProcessName" ItemStyle-Width="100px"> 
                    </telerik:GridBoundColumn> 
 
                    <telerik:GridBoundColumn HeaderText="Initiator" DataType="System.String"  
                        AutoPostBackOnFilter = "true" CurrentFilterFunction = "Contains"   
                        DataField="Originator" UniqueName="Initiator" ItemStyle-Width="90px"> 
                    </telerik:GridBoundColumn>                                   
                     
                    <telerik:GridBoundColumn HeaderText="Start Date" DataType="System.DateTime" DataFormatString="{0:MM/dd/yy}"  
                        CurrentFilterFunction = "GreaterThanOrEqualTo" AutoPostBackOnFilter = "true"  
                        DataField="StartDate" UniqueName="StartDate" ItemStyle-Width="50px"> 
                    </telerik:GridBoundColumn>                 
                                 
                    <telerik:GridBoundColumn HeaderText="Folio" DataType="System.String" HeaderStyle-HorizontalAlign="Center"  
                        AutoPostBackOnFilter = "true" CurrentFilterFunction = "Contains"   
                        DataField="Folio" UniqueName="Folio"> 
                    </telerik:GridBoundColumn>      
 
                    <telerik:GridBoundColumn HeaderText="ID" DataType="System.Int32"  
                        DataField="ID" UniqueName="ID" Display="false"> 
                    </telerik:GridBoundColumn>                              
                </Columns> 
 
                <RowIndicatorColumn Visible="true"> 
                <HeaderStyle Width="10px"></HeaderStyle> 
                </RowIndicatorColumn>                        
             
            </MasterTableView> 
 
        </telerik:RadGrid> 

Tsvetoslav
Telerik team
 answered on 16 Dec 2009
5 answers
713 views
How do I set a column's DataFormatString server side? If a user selects a dropdown I want to change to DataFormatString of all the columns in my grid.
Sebastian
Telerik team
 answered on 16 Dec 2009
1 answer
114 views
I have the next issue. I have a filexplorer :
- inside a tabstrip
- it´s located in the second tab, not index 0
- filexplorer just have the Grid option enabled
- filexplorer is empty. No files are shown
- when the page is first opened, and the user selects the second tab(where the filexplorer is located) in IE8 the filexplorer shows Grid, and the treeview. But the treeview option is not enabled. How can I avoid this behaviour.
Fiko
Telerik team
 answered on 16 Dec 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?