Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
236 views
I have a couple of timepickers in a repeater item template:
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="XmlDataSource1">  
        <HeaderTemplate> 
            <table> 
        </HeaderTemplate> 
        <ItemTemplate> 
            <tr> 
                <th colspan="2"><asp:Label ID="lblDayOfWeek" runat="server" text='<%# DataBinder.Eval(Container.DataItem,"Value") %>' /><asp:CheckBox ID="chkDayOfWeek" runat="server" OnCheckedChanged="DayOfWeek_Changed" AutoPostBack="true" /></th>  
            </tr> 
            <tr id="trRepeaterTimes" runat="server">  
                <td>Start Time:<telerik:RadTimePicker ID="RadTimePicker1" runat="server" Skin="Vista" TimeView-Interval="0:30" TimeView-Columns="6" /></td>  
                <td>End Time:<telerik:RadTimePicker ID="RadTimePicker2" runat="server" Skin="Vista" TimeView-Interval="0:30" TimeView-Columns="6" /></td>  
            </tr> 
        </ItemTemplate> 
        <FooterTemplate> 
            </table> 
        </FooterTemplate> 
    </asp:Repeater> 


When the checkbox next to the day of the week is checked, I want to show the timepicker (or the row they are in).  This works fine for showing/hiding the row but the timepicker will not show the available times.  I assume this has to do with how the page is seeign or not seeing the controls as they are set visible=true; or visible=false;  (that is why I tried style=display:none)

protected void DayOfWeek_Changed(object sender, EventArgs e)  
    {  
          
        foreach (RepeaterItem dataItem in Repeater1.Items)  
        {  
            CheckBox chk = (CheckBox)dataItem.FindControl("chkDayOfWeek");  
            RadTimePicker rtp1 = (RadTimePicker)dataItem.FindControl("RadTimePicker1");  
            RadTimePicker rtp2 = (RadTimePicker)dataItem.FindControl("RadTimePicker2");  
            HtmlTableRow tr = (HtmlTableRow)dataItem.FindControl("trRepeaterTimes");  
            if (chk.Checked)  
            {  
                tr.Attributes.Add("style", "display:normal;");  
                rtp1.Visible = true;  
                rtp2.Visible = true;  
                RadAjaxManager1.AjaxSettings.AddAjaxSetting(rtp1, rtp1);  
            }  
            else 
            {  
                tr.Attributes.Add("style", "display:none;");  
                rtp2.Visible = false;  
                rtp1.Visible = false;  
            }  
        }  
    } 

Does anyone know how I can set the visibililty and still keep the timepickers functioning correctly?

Thanks

-Brent
Steve
Telerik team
 answered on 25 Feb 2008
1 answer
99 views
Is it possible to have an editable grid such as the one depicted here where you can change the parent of a child item via drag and drop (or some other similar mechanism not requiring a postback)?
Sebastian
Telerik team
 answered on 25 Feb 2008
3 answers
211 views
By default, some of the toolbars are disabled within the toolsfile.  If a user has permission we enable one or more toolbars.  How do I enable a toolbar via code?  I have the following function:
 
    ' Name:         EnableToolbar  
    ' Purpose:      Enables the toolbar.  
    ' Parameters:   radEditor      - The rad editor.  
    '               strToolbarName - The name of the toolbar to enable.  
    ' Returns:      Nothing.  
    Public Shared Sub EnableToolbar(ByRef radEditor As RadEditor, ByVal strToolbarName As String)  
 
        Dim radEditorToolGroupCollection As EditorToolGroupCollection  
        Dim radEditorToolGroup As EditorToolGroup = Nothing 
        Dim l_bToolbarFound As Boolean = False 
 
        ' Read the collection of tools.  
        radEditorradEditorToolGroupCollection = radEditor.Tools  
 
        ' Iterate through the collection.  
        For Each radEditorToolGroup In radEditorToolGroupCollection  
            If (radEditorToolGroup.Tag = strToolbarName) Then  
                ' I have found the toolbar, but how do I enable it?  
            End If  
        Next  
    End Sub 

which identifies the correct toolbar but there is no enabled property to set.  Any ideas how to do this?

Many thanks
George
Telerik team
 answered on 25 Feb 2008
5 answers
307 views
Hi,

Setting DestroyOnClose="true" in RadWindowManager does not appear to work. The code worked okay with RadWindow 1.9 but not with 2.0.

Windows are opened using RadWindowManager and closing a window does not remove it from the manager.

<telerik:RadWindowManager  
            id="RadWindowManager1" 
            VisibleOnPageLoad="true" 
            DestroyOnClose="true" 
            ShowContentDuringLoad="false" 
            Skin="Vista" 
            InitialBehaviors="Close,Maximize,Minimize,Move,Resize" 
            MinimizeZoneId="HorizontalMinimize" 
            OnClientShow = "OnClientShowRadWindow" 
            OnClientPageLoad = "OnClientPageLoadRadWindow" 
            OnClientDragStart = "OnClientDragStartRadWindow" 
            OnClientDragEnd = "OnClientDragEndRadWindow" 
            OnClientClose = "OnClientCloseRadWindow" 
            runat="server">  
            <Windows> 
                <telerik:RadWindow ID="ModalWindow" runat="server" Behavior="None"   
                    DestroyOnClose="true" Modal="true"   
                    VisibleOnPageLoad="false" /> 
            </Windows> 
        </telerik:RadWindowManager> 

Am I doing something wrong ?

Bob.
Georgi Tunev
Telerik team
 answered on 25 Feb 2008
3 answers
234 views
I'm trying to get my link button to work with the RadGrid in generating an Excel file.  I have a RadAjaxManager which is performing some AJAX on my page - most notably the link button and grid.  However, when clicking the link button nothing happens and after doing some research I think I understand why...

The export functionality cannot use AJAX, therefore it needs to be disabled when making the request.  I found a thread in the forums that posted some sample code and it looks great.  The only difference (and the one I believe is causing the issue) is that the example is done on a single content page, whereas mine is inheriting a Master Page.  So anyway, the client-side code of interest looks like this...

 <script type="text/javascript">

    function mngRequestStarted(ajaxManager, eventArgs)

    {

      if(eventArgs.EventTarget == "lnkExcel")

      {

         eventArgs.EnableAjax = false;

      }

    }

 </script>


This does not have any affect when used within the Master Page.  I can actually see a slight movement of the grid so I know Ajax is still working here.  After a bit of debugging, I found the if statement never returns true because the control is nested in the Master Page and gets a funky id (thanks ASP.NET).  


How do I change the "lnkExcel" part to return the id of the control even when it's on a Master Page?


Thanks.

Steve
Telerik team
 answered on 25 Feb 2008
4 answers
140 views
Hi, I've got a RadWindowManager control sited on a page with an IFrame. I have a javascript function to show a dialog window but whichever method i use (radopen, GetRadWindowManager etc) it always fails with RadWindowManager undefined. If I take the Iframe off it works fine. Can you help with this problem please.

Thanks in advance,

John
John
Top achievements
Rank 1
 answered on 25 Feb 2008
2 answers
124 views
Hi,
before sending detailed data, please check, if this "message" has something meaningful for you:
****************************************
[Exception... "'Sys.ScriptLoadFailedException: Sys.ScriptLoadFailedException: Fehlender Aufruf von Sys.Application.notifyScriptLoaded().' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
Sys$CultureInfo$_getAbbrMonthIndex("")
******************************************
This happens, when invoking a dynamically created editor-instance in a Pane (and asp:panel) via Ajax from another Pane.
Without Ajax, all is ok.

Best regards,
Andreas
Tsvetie
Telerik team
 answered on 25 Feb 2008
1 answer
160 views
When I add or edit a row, I would like to set the values in the textboxes via a javascript on the client side (not only as "default values").

My business case is to enter first an amount and let the javascript calculated the others values.

Is there a way to access the controls and set the values?

Thanks
Eric
Sebastian
Telerik team
 answered on 25 Feb 2008
1 answer
42 views
Just a general question here based off my previous use of ComponentArt's tool.

I found the Search feature for their Grid control to be very useful, especially in larger grids with a lot of columns.

Does Telerik have any plans to implement this type of functionality into the Grid component?
Yavor
Telerik team
 answered on 25 Feb 2008
9 answers
247 views
My work requires me to create composite controls on a regular basis.  Often I want these controls ajaxified.

But, I'm having trouble using the RadAjaxManager in a composite control.
I've done an exhaustive search through these forum and find others encountering similar problems with dissimiliar project requirements, but the solutions suggested either don't apply or don't work.

First Question:
In a Custom Composite Control, how does one check for the existence of a RadAjaxManager on the page and when does one do it. 

Second Question:
I do some recursive enumerations to find the RadAjaxManger on the page, currently.  Its ugly, but it works.  However, each time I reference the RadAjaxManager already existent on the page, the AjaxSettings count of said reference = 0, even though I've added AjaxSettings previously and those settings work seem to work.

After obtaining said reference, I then attempt (in the Composite Control ) to add AjaxSettings to the manager.  If I attempt this in the Composite Control's OnInit I get 'Object not set to an Instance of an Object', although all objects involved are indeed NOT NULL.

If I make the same attemp in the Composite Control's OnLoad, I get an error claiming that the Page object can not be null.  I didn't pass in a page object, the RadAjaxManager was already on the page and I got a reference to it.  This error doesn't seem to detail the actual problem.

I can not isolate the problem into a test project because of the project's requirements.

Anyone have any suggestions how to use RadAjaxManager from customer Composite Controls?
Doug Beard
Top achievements
Rank 2
 answered on 25 Feb 2008
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?