Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views

Hi,

I am using PanelBar to display templated items.In the first item, I have a vertical RadRotator that rotates images.In the seocnd item, I have a calendar.The first item is displayed by default, so the rotator shows when the page is loaded.When I click on the second panelbar item, the calendar is displayed but after 2 to 3 seconds, I get a javascript error:
==============

A runtime error has occured.

Error: 'control' is null or not an object

==============

I am thinking there is a javascript function trying to move the retator frames but it is missing something, since the rotator is hidden (because the panel item is not displayed)

Any ideas??

Thanks

ENV:
Vista,IIS7, ASP.NET 3.5 SP1,Telerik 2008 Q3,IE7

Atanas Korchev
Telerik team
 answered on 16 Jun 2009
2 answers
194 views
Hi,

I had a radgrid in a pageview within a multipageview with some javascript to allow a windowt o open when a row in the grid is clicked. This worked fine until I changed the Multipageview so that the pageviews would load on demand (on tabclick) which I implemented by creating a user control for each pageview and moving the existing radgrid into this control.

Now when the pageview is loaded I get a javascript error on the page "Error: 'RowSelected' is undefined" and when I view the source the RowSelected function does not seem to exist. I have tried adding the javascript programatically using RegisterClientScriptBlock whithin the .ascx.cs file in the Page_Load method but this does not seem to help and I'm not sure about how to deal with the radcodeblock tags. I don't have alot of experience with javascript or user controls so it's bound to be something simple I'm missing.

Any help would be much appreciated, I can supply more code if required.

User Control:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PhoneDir.ascx.cs" Inherits="PhoneDir" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<telerik:RadCodeBlock ID="rcb1" runat="server">  
 
<script type="javascript">  
function RowSelected(sender, args)  
            {  
                var firstDataItem = $find("<%=rgPhoneDir.ClientID %>").get_masterTableView().get_dataItems()[0];  
                var uname = args.getDataKeyValue("username") ;  
                window.radopen("userinfo.aspx?id=" + uname,"RadWindow1");  
            }  
</script> 
 
</telerik:RadCodeBlock> 
<telerik:RadGrid ID="rgPhoneDir" runat="server" AllowSorting="True" GridLines="None" 
    Height="100%" Skin="Office2007" DataSourceID="SqlDataSource1"   
    onitemcommand="rgPhoneDir_ItemCommand">  
      
    <MasterTableView CellSpacing="-1" ClientDataKeyNames="username" AutoGenerateColumns="False" 
        DataKeyNames="username" DataSourceID="SqlDataSource1">  
        <Columns> 
            <telerik:GridBoundColumn DataField="username" HeaderText="username" ReadOnly="True" 
                SortExpression="username" UniqueName="username" Visible="False">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Internal Phone" HeaderText="Internal Phone" SortExpression="Internal Phone" 
                UniqueName="Internal Phone">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Surname" HeaderText="Surname" SortExpression="Surname" 
                UniqueName="Surname">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="First Name" HeaderText="First Name" SortExpression="First Name" 
                UniqueName="First Name">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Branch" HeaderText="Branch" SortExpression="Branch" 
                UniqueName="Branch">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Department" HeaderText="Department" SortExpression="Department" 
                UniqueName="Department">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" 
                UniqueName="Mobile">  
            </telerik:GridBoundColumn> 
        </Columns> 
        <EditFormSettings> 
            <EditColumn UniqueName="EditCommandColumn1">  
            </EditColumn> 
        </EditFormSettings> 
    </MasterTableView> 
    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="True">  
        <Selecting AllowRowSelect="True" /> 
        <ClientEvents OnRowSelected="RowSelected" OnRowClick="RowSelected" /> 
    </ClientSettings> 
</telerik:RadGrid> 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:sql %>" 
    SelectCommand="SELECT username,phoneinternal AS 'Internal Phone',sname AS 'Surname',fname AS 'First Name',office AS 'Branch',department AS 'Department',mobile AS 'Mobile' FROM Phone_Dir WHERE phoneinternal IS NOT NULL AND phoneinternal &lt;&gt; '' ORDER BY office,sname">  
</asp:SqlDataSource> 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
</telerik:RadWindowManager> 
<telerik:RadWindow ID="RadWindow1" runat="server">  
</telerik:RadWindow> 

When trying to add the javascript programatically:
    protected void Page_Load(object sender, EventArgs e)  
    {  
 
        string javascript = "<script type=\"text/javascript\">";  
        javascript += "function RowSelected(sender, args){var firstDataItem = $find(\"<%=rgPhoneDir.ClientID %>\").get_masterTableView().get_dataItems()[0];var uname = args.getDataKeyValue(\"username\") ;window.radopen(\"userinfo.aspx?id=\" + uname,\"RadWindow1\");}";  
        javascript += "</script>";  
        this.Page.ClientScript.RegisterClientScriptBlock(typeof(Page),"ClientScript", javascript);  
 
    } 
Greg
Top achievements
Rank 1
 answered on 16 Jun 2009
1 answer
146 views
If the filter menu hits the bottom of the bowser window then it starts to go up, which is great except it flows behind my rad menu. The rad menu is in the master page and the grid is in the content page.

Any idea as to how to prevent that?

Thanks
Randy Miller
Princy
Top achievements
Rank 2
 answered on 16 Jun 2009
3 answers
314 views
Hi,
  I am having radgrid and other controls like textbox  in parent page .from parent page i open a radwindow and select some
values  and when i close that radwinow ,i want to refresh my radgrid only not the other control so that it should show new values .Is that possible. if yes could u please tell me how.
Thanks
Nirmal
Top achievements
Rank 1
 answered on 16 Jun 2009
1 answer
98 views
Hello  team telerik,

When we use in Rad Editor Lite the font size "3", the html code is the following:
<div class="ExternalClassFD3A75651CF744CF81A19D8F45FE84D1">Test</div>
There ist no tag concerning the font size!

When we use the font size "2", the html code is:
<div class="ExternalClassFD3A75651CF744CF81A19D8F45FE84D1"><font size="2">Test</font></div>
Here we can see the expected font size tag.
The same result with font size "4":
<div class="ExternalClassFD3A75651CF744CF81A19D8F45FE84D1"><font size="4">Test</font></div>

We need the font tag "3" for our web design, but we can not use it. Why?
Stanimir
Telerik team
 answered on 16 Jun 2009
1 answer
66 views
Hello All,

I have been maintaining an application that uses a RadGrid in "Slider" paging mode. I recently switched to client-side databinding with a webservice and dramatically reduced my request/response size from 100k to 2k, but I notice when I press the left/right buttons on the radgrid pager, nothing happens. If I switch to for example "Numeric,next,prev" mode, pressing next/prev works as desired.

Is there a workaround?


Thanks!! :)
Pavel
Telerik team
 answered on 16 Jun 2009
1 answer
109 views
Hi, Raddock can't be draggable and close icon is not working when I my table got 3 columns.
For clearer picture, please take a look at the attached source. Note that my 3 RadDocks have exactly the same attribute/property.

<telerik:raddocklayout runat="server" id="RadDockLayout1" >
    <table>
        <tr>
            <td>
                <telerik:raddockzone runat="server" id="RadDockZone3" MinHeight="200" Width="285px" Height="500px">
                    <telerik:raddock runat="server" id="RadDock2" title="Message Board">                        
                        <contenttemplate>
                         <br />
                         <ul>
                         <li>Click the first or the second icon in the titlebar to see the action of the custom commands.</li>
                         <li>Click the Close button on the title bar to close the object.</li>
                         </ul>
                         <br />
                        </contenttemplate>
                    </telerik:raddock>
                </telerik:raddockzone>
            </td>
            <td>
                <telerik:raddockzone runat="server" id="RadDockZone1" MinHeight="200" Width="285px" Height="500px">
                    <telerik:raddock runat="server" id="RadDock1" title="Message Board">                        
                        <contenttemplate>
                         <br />
                         <ul>
                         <li>Click the first or the second icon in the titlebar to see the action of the custom commands.</li>
                         <li>Click the Close button on the title bar to close the object.</li>
                         </ul>
                         <br />
                        </contenttemplate>
                    </telerik:raddock>
                </telerik:raddockzone>
            </td>         
            <td>
                <telerik:raddockzone runat="server" id="RadDockZone2" MinHeight="200" Width="285px" Height="500px">
                    <telerik:raddock runat="server" id="RadDock3" title="Message Board">                        
                        <contenttemplate>
                         <br />
                         <ul>
                         <li>Click the first or the second icon in the titlebar to see the action of the custom commands.</li>
                         <li>Click the Close button on the title bar to close the object.</li>
                         </ul>
                         <br />
                        </contenttemplate>
                    </telerik:raddock>
                </telerik:raddockzone>
            </td>         
        </tr>        
    </table>
</telerik:raddocklayout>  
Pero
Telerik team
 answered on 16 Jun 2009
2 answers
195 views
Hi all,

I was wondering if it's possible to move a dynamically created dock up or down (within it's dynamically created zone) by the user clicking on a dock's command (client or server side code, just as long as there is a postback at some stage after the move to save the new position)?

For example, I have a dynamically created zone with 3 dynamically created docks (1, 2, 3 - in that order) and the user wants to move dock 1 to be in position 2 (so then the order would be 2, 1, 3), is it possible to do that by clicking on a command rather than by them dragging the dock to position 2?

I've tried zone.Docks.Insert(2, dock) and zone.Controls.AddAt(2, dock) without success, but the dock doesn't move.

The reason I ask is that some docks are long and if the dock content goes down beyond the height of the browser then you can't drag a dock below that long one.

I should mention that the zones and docks are all created dynamically (based on a database) and during postbacks/ajax call backs docks are saved to the session and recreated on init.

Any ideas?

My current solution is to allow users to minimise the dock contents, thus removing the issue of long docks breaking over the page, but I would have thought it was a fairly basic and desired functionality to be able to have dock commands that move docks up and down.

Thanks,
Pete
Pero
Telerik team
 answered on 16 Jun 2009
5 answers
357 views
Hi All,

I wonder if there is a declarative way to define a filter column to be controlled by a drop down list box? 

This is something we need all the time - typical scenario is looking up a value from a related table (e.g. categories for parts in NorthWind database).  Our previous component suite made this very easy and I was surprised to see this wasn't a case of setting a few switches in the column properties.

There is a fairly tortuous example on Telerik's website whereby a custom class is defined: there follows much messing around in the page load event and other routines have to be written to hold the thing together.  Just seems a very surprising omission from what is a very accomplished suite.

This completes an evaluation of Telerik which has gone very well, save for this one surprising omission in functionality.

Any help much appreciated!

Peter Hearn
Michael
Top achievements
Rank 1
 answered on 16 Jun 2009
4 answers
178 views
Hi,

I have implemented two buttons on the toolbar. A save & close and a cancel. The editor is in a tabstrip which is in a grid. The editor starts when the grid is put into edit mode. The buttons save the edited html to a database and exit the grid's edit mode or cancel edit mode. All this works fine.

If a user toggles full screen mode, everything works as expected i.e. the screen can be toggled back and forth. If a user clicks the save or cancel buttons while not in full screen mode, the grid exits editmode and the screen paints correctly. However, when a user is in full-screen mode and they click save or cancel, the grid exits edit mode as expected but the screen is left in a weird semi-full screen state (i.e. the grid now takes up full width and other items are partially on screen and partially off-screen but there are no scroll bars.

So. My questions are:

1. In the short term, how can I exit full screen mode programatically when either save or cancel are clicked.

2. Shouldn't the editor automatically exit full screen mode when it's finished?

Thanks, Steve
Rumen
Telerik team
 answered on 16 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?