Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
171 views
Hi,
I use a dock with a set of custom commands and I use the radconfirm function on one of the command. When calling dock.set_close(true) in the callback of radconfirm the dock is closed in the browser but when I make a post back, the dock is not closed on the server. If i don't use a callback everything is fine.
Here is a test page with this scenario:

Docks.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Docks.aspx.cs" Inherits="Docks" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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"> 
<head runat="server"> 
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <div> 
        <script type="text/javascript"> 
            function closeDock(dock, args){ 
                setTimeout( function(){ dock.set_closed(true);}, 100); 
            } 
        </script> 
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
        <telerik:RadDock ID="dock1" runat="server"> 
            <Commands> 
                <telerik:DockCommand Name="close" Text="close" OnClientCommand="closeDock" /> 
            </Commands> 
        </telerik:RadDock> 
        <br /> 
        <br /> 
        <br /> 
        <br /> 
        <asp:Button ID="btn1" runat="server" Text="Post back"/> 
        <asp:Label ID="result" runat="server"></asp:Label> 
    </div> 
    </form> 
</body> 
</html> 


Docks.aspx.cs:

using System; 
 
public partial class Docks : System.Web.UI.Page 
{ 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        result.Text = string.Empty; 
        btn1.Click += new EventHandler(btn1_Click); 
    } 
 
    void btn1_Click(object sender, EventArgs e) 
    { 
        result.Text = dock1.Closed.ToString(); 
    } 
} 
 

When I closed the dock and click the button the Closed property is still false. If the js function is changed to this:

function closeDock(dock, args){ 
    dock.set_closed(true); 
} 
 

everything is ok. What I want is that the Closed property is true even if I use a callback. Any help would be appreciated.
Thank you,
Ivan Pelovski









Petio Petkov
Telerik team
 answered on 19 Mar 2009
1 answer
120 views
 function OpenWindow(PID)
                {
                    var wnd = window.radopen("personDetail.aspx?="+PID, null);         
                    wnd.setSize(400,400);
                    return false;
                }


By the above code window will get open once.....after i maximize the window....then we click ...the second window getting open with same url.

I dont want to get second window to be open. The same url to be open maximized window(existing window).

same thing is happing in the below url
http://demos.telerik.com/aspnet-ajax/window/examples/windowmanager/defaultcs.aspx


Thanks,
Satish.
Fiko
Telerik team
 answered on 19 Mar 2009
4 answers
83 views
Hi,

I have just put on Rad Controls Q1 2009 and throught I would try the RowHeight command again, as I need more timeslots being displayed than the default.  This seems to work OK, except for the first time.

I have tried RadScheduler1.RowHeight = 16 and also tried the same in the  markup with RowHeight="16".

This displays correctly on load, but on editing any time slot (I use a RadWIndow to open an edit or insert window) or dropping an event from a RadGrid, the FIRST TIME only the height reverts back to default.  If I refresh the screen it goes back to my 16 height and stays there until I close the app and re-open it again, where once more it reverts to default immediately after editing or adding an event, refresh fixes it and it stays again.

David Penny
David Penny
Top achievements
Rank 2
 answered on 19 Mar 2009
1 answer
137 views
I'm trying to update a label in one user control when a node in a tree in another user control is clicked.  I've looked at the examples and threads in this forum but I still haven't been able to get anything to work.  I have a user control that has a RadSplitter in a panel.  The splitter has a user control in the left pane with a RadTreeView and a user control in the right pane with labels, text boxes, etc.  When a node is clicked in the tree view in the user control in the left pane, I want to update a label in the user control in the right pane.

I'd appreciate it if someone can point me to example code that will show me how to accomplish this.

Thanks,
Jim
Jim
Top achievements
Rank 1
 answered on 19 Mar 2009
2 answers
112 views
I have a RadGrid that is within a contentPlaceHolder. In the master page I define a footer to appear after the contentplaceholder. This seems to work fine until someone clicks the "View All" functioinality in the RadGrid. This causes the grid to expand past the end of the contentPlaceholder.

Here is the majority of the code in the Master Page. Notice the pagefooter control.

<body> 
        <form id="mainMasterForm" runat="server"> 
            <atk:ToolkitScriptManager ID="mainScriptManager" runat="Server"/> 
            <div class="panel"> 
                <div class="headerPanel"> 
                    <table border="0" cellpadding="0" cellspacing="0" width="100%"> 
                        <tr> 
                            <td rowspan="3" align="left"> 
                                <asp:Image ID="vertexLogo" AlternateText="VertexLogo" ImageUrl="~/App_Themes/VertexDefault/Images/VertexLogo202x80.png" runat="server" /> 
                            </td> 
                            <td align="left" class="boldText" > 
                                <asp:Label ID="userFullNameLabel" runat="Server" /> 
                            </td> 
                            <td align="right" class="boldText"> 
                                <asp:Label ID="currentDateLabel" runat="Server" /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td align="left" class="boldText"> 
                                <asp:Label ID="customerNameLabel" runat="server" />&nbsp;&nbsp; 
                                <asp:Label ID="filingEntityLabel" runat="server" /> 
                            </td> 
                            <td align="right"> 
                                <asp:HyperLink ID="logoutLink" NavigateUrl="~/Common/Logout.aspx" Text="[Log Out]" runat="server" /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td valign="bottom" colspan="2" style="width:630px"> 
                                <asp:Menu ID="mainMenu" runat="server" StaticDisplayLevels="1" StaticEnableDefaultPopOutImage="false"  
                                    Orientation="Horizontal" StaticSubMenuIndent="0px"> 
                                    <StaticMenuStyle CssClass="menuHeaderStyle" /> 
                                    <DynamicMenuItemStyle CssClass="menuStyle" /> 
                                    <DynamicHoverStyle CssClass="menuStyle" /> 
                                </asp:Menu> 
                            </td> 
                        </tr> 
                    </table> 
                </div> 
                <div class="content"> 
                    <br /> 
                    <asp:ContentPlaceHolder ID="mainContentPlaceHolder" runat="server" /> 
                </div> 
            </div> 
            <vtx:MessageBox ID="messageBoxControl" runat="server" /> 
            <vtx:PageFooter ID="vertexFooter" runat="server" /> 
        </form> 
    </body> 

Here is the apsx code that has the actual RadGrid.

<asp:Content ID="viewActivityLogContent" ContentPlaceHolderID="mainContentPlaceHolder" runat="server"> 
    <h1>View Activity Logs</h1> 
    <br /> 
    <asp:Image ID="horizBar" AlternateText="Horizontal Bar" ImageUrl="~/App_Themes/VertexDefault/Images/HorizontalBar860x5.png" runat="server"/> 
    <table border="0" cellpadding="4" cellspacing="0" width="90%" class="dataEntry_Table"> 
        <tr class="dataEntry_TableHeader"> 
            <td colspan="5">&nbsp;Search Parameters</td> 
        </tr> 
        <tr> 
            <td align="left" style="width:18%">&nbsp;Date Range:</td> 
            <td align="left" style="width:18%"><rad:RadDatePicker id="dateFromDatePicker" AutoPostBack="false" Width="140px" runat="server" /></td> 
            <td align="left" >to</td> 
            <td align="left"><rad:RadDatePicker ID="dateToDatePicker" AutoPostBack="false" Width="140px" runat="server" /></td> 
            <td>&nbsp;</td> 
        </tr> 
        <tr> 
            <td align="left">&nbsp;Filter activity list by:</td> 
            <td align="left"> 
                <asp:DropDownList ID="activityListFilterDDL" AutoPostBack="false"  Width="140px" runat="server"> 
                    <asp:ListItem Text="Customer Number" Value="1" /> 
                    <asp:ListItem Text="Customer Name" Value="2" /> 
                </asp:DropDownList> 
            </td> 
            <td align="left" colspan="2"> 
                <asp:TextBox ID="activityFilterTextBox" Width="180px" runat="server" /> 
            </td> 
            <td align="left"> 
                <asp:Button ID="searchButton" Text="Search" OnClick="searchButton_Click" runat="server" /> 
                <asp:Button ID="clearButton" Text="Clear" OnClick="clearButton_Click" runat="server" /> 
                <asp:Button ID="pdfExportButton" Text="Download Log File" OnClick="pdfExportButton_Click" runat="server" /> 
            </td> 
        </tr> 
    </table> 
    <table border="0" cellpadding="0" cellspacing="0" width="90%" > 
        <tr> 
            <td align="center" colspan="4"> 
                <rad:RadGrid ID="activityLogListRadGrid" AllowPaging="True" AllowSorting="true" GridLines="Horizontal" HorizontalAlign="Center" ShowFooter="true" ShowStatusBar="true"  
                    EnableAJAX="True" EnableAJAXLoadingTemplate="True" LoadingTemplateTransparency="25" Skin="Grid" SkinsPath="~/App_Themes/VertexDefault"  
                    PageSize="16" AutoGenerateColumns="False" OnItemDataBound="activityLogListRadGrid_ItemDataBound" OnSortCommand="activityLogListRadGrid_SortCommand"  
                    OnNeedDataSource="activityLogListRadGrid_NeedDataSource" OnItemCommand="activityLogListRadGrid_ItemCommand" runat="server" > 
                    <SortingSettings SortToolTip="Click to sort" /> 
                    <ExportSettings IgnorePaging="true" OpenInNewWindow="true"> 
                        <Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous" 
                        Keywords="None" PageWidth="1000" PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in" PageTopMargin="1in" PageTitle="Activity Log Detail" 
                        Subject="RadGrid Export" Title="Activity Log Detail" PaperSize="Letter" /> 
                    </ExportSettings> 
                    <PagerStyle AlwaysVisible="true" Height="25px" Mode="NumericPages" Position="Bottom" /> 
                    <MasterTableView DataKeyNames="CustomerID,CreateUserID,CreateDateTime" TableLayout="Auto" AllowNaturalSort="false" Style="border: 0px solid #eaf2fd;" BorderColor="Black"> 
                        <SortExpressions> 
                            <rad:GridSortExpression FieldName="CreateDateTime" SortOrder="Ascending" /> 
                        </SortExpressions> 
                        <Columns> 
                            <rad:GridBoundColumn HeaderStyle-Width="200px" DataField="CreateDateTime" HeaderText="Activity Date" SortExpression="CreateDateTime" 
                                    UniqueName="CreateDateTime" DataFormatString="{0:MM/dd/yyyy hh:mm:ss}" ItemStyle-Wrap="False" /> 
                            <rad:GridHyperLinkColumn HeaderStyle-Width="200px" DataTextField="EventName" DataNavigateUrlFields="EventID" 
                                    DataNavigateUrlFormatString="~\Returns\ActivityLogDetail.aspx?EventID={0}" HeaderText="Event Name" SortExpression="EventName" UniqueName="EventName" /> 
                            <rad:GridBoundColumn HeaderStyle-Width="225px" DataField="LastNameFirstName" HeaderText="User" SortExpression="LastNameFirstName"  
                                    UniqueName="LastNameFirstName" ItemStyle-Wrap="False" /> 
                            <rad:GridHyperLinkColumn HeaderStyle-Width="215px" DataTextField="CustomerName" DataNavigateUrlFields="EventID" 
                                    DataNavigateUrlFormatString="~\Returns\ActivityLogDetail.aspx?EventID={0}" HeaderText="Customer" SortExpression="CustomerName" UniqueName="CustomerName" /> 
                        </Columns> 
                        <PagerTemplate> 
                            <vtx:GridPager ID="gridPagerControl" runat="server" /> 
                        </PagerTemplate> 
                    </MasterTableView> 
                </rad:RadGrid> 
                <input type="hidden" id="userContextMenuAction" name="userContextMenuAction" runat="server"/> 
            </td> 
        </tr> 
    </table> 
</asp:Content> 

I just need the footer to remain at the bottom of the grid when "View All" is clicked.


[EDIT] After looking at this a little more I simply need to do a full postback. So how can I trap the View All event and trigger a full postback? That should solve this issue.

Thanks,

julian


Julian
Top achievements
Rank 1
 answered on 19 Mar 2009
2 answers
107 views
Hello,

Just migrated from last 2008 version to Q1.2009 and I now get this javascript error.
I am using a variant of the sliding radpanel sample and it seems to crash now in

function SetUpAnimation() {  
    //cleanSlider();  
    panelDomElement.style.position = "relative";  
    var expandAnimation = new Telerik.Web.UI.AnimationSettings({});  
    var collapseAnimation = new Telerik.Web.UI.AnimationSettings({});  
    slide = new Telerik.Web.UI.Slide(panelDomElement, expandAnimation, collapseAnimation, false);  
    slide.initialize();  
    slide.set_direction(Telerik.Web.UI.SlideDirection.Right);  
    slider.onclick = function()   
    {  
        panelDomElement.parentNode.style.visibility = "visible";  
        panelDomElement.parentNode.style.display = "block";  
        if (!expanded)   
        {  
            slide.expand();  
        }  
        else   
        {  
            slide.collapse();  
        }  
        expanded = !expanded;  
        return false;  
    }  
} 
 

 

 


Thanks for urgent help.

CS

 

 

CSurieux
Top achievements
Rank 2
 answered on 19 Mar 2009
4 answers
87 views
I found that I could simply add a ImageField to show images in GridView, but can I do that as simply in RadGrid?  If not, could Telerik change this situation in the future version of RadGid?  Thanks a lot.
HsuKang
Top achievements
Rank 1
 answered on 19 Mar 2009
1 answer
151 views
Hi,

I am struggling with the following and hope someone out there can help. I am binding to a scheduler based on a RadComboBox selection. Error handling is in place, so that if there is no schedule data, we set the datasource for our scheduler to an empty dataset from the following function

 Function EmptySchedulerDataTable() As DataTable
        Dim tbl As New DataTable

        tbl.Columns.Add(New Data.DataColumn("PresentationID"))
        tbl.Columns.Add(New Data.DataColumn("PresentationName"))
        tbl.Columns.Add(New Data.DataColumn("StartTime"))
        tbl.Columns.Add(New Data.DataColumn("EndTime"))
        Dim rw As Data.DataRow
        rw = tbl.NewRow()
        rw("PresentationID") = 1
        rw("PresentationName") = "No Agenda Available"
        rw("StartTime") = Date.Now
        rw("EndTime") = Date.Now.AddDays(1)
        tbl.Rows.Add(rw)
        Return tbl
    End Function

Unfortunately, I am getting an error that I have not seen before (just upgraded to q1 2009) as follows

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.
Parameter name: value
   at System.DateTime.Subtract(TimeSpan value)
   at Telerik.Web.UI.Scheduling.DateHelper.GetStartOfWeek(DateTime selectedDate, DayOfWeek weekStart, Int32 numDays)
   at Telerik.Web.UI.Scheduling.DateHelper.GetStartOfWeek(DateTime selectedDate, DayOfWeek weekStart)
   at Telerik.Web.UI.Scheduling.DateHelper.GetWeekLength(DateTime date, DayOfWeek firstDayOfWeek, DayOfWeek lastDayOfWeek)
   at Telerik.Web.UI.Scheduler.Views.Week.ModelBase..ctor(IScheduler owner)
   at Telerik.Web.UI.Scheduler.Views.Week.Model..ctor(IScheduler owner, IWeekTimeSlotFactory slotFactory, TimeSpan workDayStartTime, TimeSpan workDayEndTime)
   at Telerik.Web.UI.Scheduler.Views.Week.Model..ctor(IScheduler owner, TimeSpan workDayStartTime, TimeSpan workDayEndTime)
   at Telerik.Web.UI.Scheduler.Views.Week.Model..ctor(IScheduler owner)
   at Telerik.Web.UI.Scheduler.Views.WeekModelFactory.CreateModel()
   at Telerik.Web.UI.RadScheduler.CreateView()
   at Telerik.Web.UI.RadScheduler.ClearChildControls()
   at Telerik.Web.UI.RadScheduler.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

What are we doing wrong here? thanks.






Peter
Telerik team
 answered on 19 Mar 2009
9 answers
346 views
Hey guys,

A couple of months back I tried out your upload control.  I was excited to get a progress indicator up and running on my site.  I recall at that time I could not get it to work properly, i.e the progress display was not showing.

Fast forward to today and I was ready to give it another shot.  Unfortunately it is still not working for me.  I have followed step-by-step instructions and re-read demos/articles several times. 

Here's the article: http://www.telerik.com/help/aspnet-ajax/upload_gettingstarted.html

I've checked over my web.config file and it matches exactly as stated here: http://www.telerik.com/help/aspnet-ajax/upload_configurationraduploadhttpmodule.html

My final attempt to uncover the issue, involved running the demo that works for me on your site, locally.  This is the demo that I ran: http://localhost:2278/Live%20Demos/Upload/Examples/CustomizingRadProgressAreaUI/DefaultVB.aspx?RadUrid=5a2e51b7-8bb8-4b7d-836e-81df6a26109f

When I run that from your site, remotely, it works great.  However, on my machine, I do not get the progress bar.  Doing this enabled me to rule out a problem with my code and now it seems that there is some machine configuration issue going on here?

I'm using the following:
-Windows Vista Home Premium 64bit
-Visual Studio 2008 Pro
-Built in Visual Studio Web Server, NOT IIS

I have tried uploading large files + putting the thread to sleep for a few seconds.  Nothing works for me.  I'd really like to give this control another go and get her up and running properly.  Please help, thank you.
Veselin Vasilev
Telerik team
 answered on 19 Mar 2009
1 answer
108 views
I am using a ToolTipManager on a page which is inherited from a master page.
I have one image that shows a tooltip onmouseover.
I noticed that a blank tooltip pops up when I hover over an image which is far from the intended one.
Anyone have this issue? How can I prevent this.

Thanks

 function showToolTip(element) { 
 
        var tooltipManager = $find("<%= RadToolTipManager1.ClientID %>");         
        if (!tooltipManager) return; 
        var tooltip = tooltipManager.getToolTipByElement(element); 
        if (!tooltip) { 
            tooltip = tooltipManager.createToolTip(element); 
 
            tooltip.set_value(arguments[1].toString()); 
        } 
 
        tooltip.show(); 
    } 

Svetlina Anati
Telerik team
 answered on 19 Mar 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?