Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
63 views
I have found that using the Media Manager to embed .mp3 files doesn't really work for me because the embedded code will only work in Internet Explorer.  In other browsers, either nothing is displayed or I am prompted to install a plugin (which isn't good because I don't know what plugins my end users will have in their browser).

What I would like to do instead is just create a link to the uploaded .mp3 file so that when they click on the link the file will open outside the browser.  I see that the Hyperlink Manager has a button to select a file from the Download Manager.  Can a similar button be added to select a file from the Media Manager?

Or is there another solution that would work better for this situation?  Whatever help you can provide would be appreciated.

Thanks.
Dan
Dobromir
Telerik team
 answered on 13 Jan 2012
2 answers
280 views
Hi there,

Im trying to use a RadButton to close a radwindow from with the window itself (via javascript). Is it possible to call a script and to close the window?

function getRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
 
            function closeWindow()
            {
                getRadWindow().close();
            }



And here is the button:

<telerik:RadButton ID="CancelButton" runat="server" OnClick="closeWindow();" CssClass="clicker" Text="Cancel" UseSubmitBehavior="False" EnableEmbeddedScripts="false" CausesValidation="False" RegisterWithScriptManager="False">
    </telerik:RadButton>


I have tried everything, the script will only work if I use a pure HTML element. If I use the OnClick event I get the following error when the window opens: Compiler Error Message: CS1026: ) expected 


Thanks for your time

Peter
Peter
Top achievements
Rank 2
 answered on 13 Jan 2012
3 answers
151 views

Hello,
I have faced javascript issue in using RadInputManger on a composite control. The composite control having RadInputManager is used in custom user control. This custom user control is loaded in RadMultiPage where this causes javascript error (($find(‘”)… eval(disposescript[i])) )in ajax function below. Error occurs in line in bold below.

-------------------------
_updatePanel: function PageRequestManager$_updatePanel(updatePanelElement, rendering) {

for (var updatePanelID in this._scriptDisposes) {

 if (this._elementContains(updatePanelElement, document.getElementById(updatePanelID))) {

 var disposeScripts = this._scriptDisposes[updatePanelID];

 for (var i = 0, l = disposeScripts.length; i < l; i++) {

window.eval(disposeScripts[i]);

}

delete this._scriptDisposes[updatePanelID];

 }

}
-----------------------
If I remove use of RadInputManager from composite control, issue doesnt get produce. The error can be seen in Firebug in FF and IE developer in IE.

Thanks in advance,
Ravi

Vasil
Telerik team
 answered on 13 Jan 2012
0 answers
181 views
PFA for my design. It is implemented using Rad Tabstrip but it should be actual tab with round the edges and all. I have tried Outlook skin but again its repeating the tab because of increasing height. I have attached this screen graph also.
Shyam
Top achievements
Rank 1
 asked on 13 Jan 2012
1 answer
156 views
Hi,

 I have a Page 1 (using a Master) calling a dynamic UserControls. One of the Control UC1 has a RadGrid and a bunch of Client Side Javascripts to handle the onclientclicking of the gridTemplateColumns button or to handle onrowclick of the grid.

The Scripts are declared in the UC1 in a Telerik:RadCodeBlock. Initially, the page loads UC1 ( which has the grid and the js) and it works as expected... ( ie all Javascript is correctly loaded and functional). The Page 1 has some kind of custom Tab Control ( Non-telerik), which triggers a partial post back and regenerates the content of the placeholder by calling a different UC2 which does NOT have any javascript.

So far so good. Now in the logic of the page load of this Page 1, it keeps track of the last selected UC... In this case it is UC2, If I navigate to another Page 2, and come back to Page 1, UC2 is dynamically generated. When I click on TAB 1, to load UC1 ( which has the javascripts), this is where I get an uncaught reference error : ConfirmDelete is not found. ( which is one of the JS declared in the UC1 RadCodeBlock).

What am I doing wrong?

Thanks
Gotcha
Top achievements
Rank 1
 answered on 13 Jan 2012
2 answers
111 views
Hi guys,

Hope you all had a good Xmas/New year.

We are using the Ajaxspellchecker that is built into the radeditor and I have come across an issue where the spell checked content is being cached on the server.

We use a Big IP F5 load balancer to serve up all content and it is this that is holding on to the cache. In order to get around this we need to add rules of what files to exclude from cache. Are you able to help in advising what files we would need to exclude to prevent the spell checker from being cached?

Thanks for your help.

Jibber4568
Jibber4568
Top achievements
Rank 1
 answered on 13 Jan 2012
1 answer
125 views
Hi there,

I have two list box. First List box filled with items, and all items are with checkBox. how can i transfer multiple data from first list box to second list box based on selected checkBox.

and when data transferred, then transferred data should be deleted from First list box.

and how can i handle Multiple item "Drag and Drop" in above mentioned scenario.
Alok
Top achievements
Rank 2
 answered on 13 Jan 2012
6 answers
528 views

Hi,

I have this weird behaviour on one of my radgrid where the height is cut off. So the area where the rows are displayed are shorter ( I think its the rgDataDiv) .I have to say the page i have it it is quiet complex and involves a lot of dynamic controls... not sure if this is the cause...but this behaviour is only seen after a sequence of clicks ( i can always reproduce it ).

Landing on the page originally does not show the bug, but after a series of clicks ( a consistent pattern ) it happens... I'm gonna try to post my grid source and the behaviour and the generated HTML first to see... hopefully its just a stupid setting i forgot to set which you can point out...

Otherwise, If required, I'll post the full page...
Here's the Grid... Notice I've forced it to have a height of 493px.

<div style="margin-left: 12px; margin-top: 40px; clear: both;">
    <%--Grid Selected Shopping List--%>
    <telerik:RadGrid ID="grdSelectedList" runat="server" AutoGenerateColumns="False"
        CellSpacing="0" GridLines="None" ShowHeader="False" OnNeedDataSource="grdSelectedList_NeedDataSource"
        OnItemCommand="grdSelectedList_ItemCommand" OnItemCreated="grdSelectedList_ItemCreated"
        OnItemDataBound="grdSelectedList_ItemDataBound" Height="493px" Width="595px"
        Skin="gmBlueGrid" EnableEmbeddedSkins="False" Style="outline: none;" EnableViewState="false">
        <GroupingSettings ShowUnGroupButton="True" />
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <ClientEvents OnRowClick="grdSelectedList_RowClick" />
        </ClientSettings>
        <MasterTableView DataKeyNames="Account_ID, Item_ID, List_ID, Product_ID"
            ClientDataKeyNames="Account_ID, Item_ID, List_ID, Product_ID">
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <SelectFields>
                        <telerik:GridGroupByField FieldName="Category_Name" />
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="Category_Name" />
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
            <NoRecordsTemplate>
                This list is empty.<br />
                Click in "Add an Item" or "Browse Aisles" to add items to this list.
            </NoRecordsTemplate>
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn FilterControlAltText="Filter CategoryCol column" UniqueName="CategoryCol"
                    DataField="Category_Name" Groupable="true" Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn FilterControlAltText="Filter DescriptionCol column" UniqueName="DescriptionCol"
                    HeaderStyle-Width="455px">
                    <ItemTemplate>
                        <div style="width: 455px; clear: both; font-weight: bold; margin-left: -5px;">
                            <asp:Label ID="lblItemDescription" runat="server" CssClass="blackHyperlink"></asp:Label>
                        </div>
                        <div class="slGridDescription" style="margin-left: -5px;">
                            <%# DataBinder.Eval(Container.DataItem, "Detail_Line_Display") %></div>
                    </ItemTemplate>
                    <HeaderStyle Width="455px"></HeaderStyle>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn FilterControlAltText="Filter QtyCol column" UniqueName="QtyCol"
                    DataField="Size_Description" HeaderStyle-Width="70px" ItemStyle-Font-Bold="true"
                    ItemStyle-HorizontalAlign="Right">
                    <HeaderStyle Width="70px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Right" Font-Bold="True"></ItemStyle>
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn>
                    <ItemTemplate>
                        <telerik:RadButton ID="btnDeleteItem" runat="server" CommandName="DeleteItemFromShoppingList"
                            OnClientClicking="ConfirmDelete" Width="18" Height="20">
                            <Image ImageUrl="..\Images\icoDeleteRedX.gif" />
                        </telerik:RadButton>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu EnableImageSprites="False">
            <WebServiceSettings>
                <ODataSettings InitialContainerName="">
                </ODataSettings>
            </WebServiceSettings>
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            <WebServiceSettings>
                <ODataSettings InitialContainerName="">
                </ODataSettings>
            </WebServiceSettings>
        </HeaderContextMenu>
    </telerik:RadGrid>
    <br />
</div>

Attached are 4 images:
Generated HTML output of the Grid before; Note the height in the outer div of height 493px and the inner rgDataDiv ( I'm assuming it is inherited from the RadGrid declaration )
Generated HTML output of the Grid after; the height of outer div is still 493, but the rgDataDiv is now set to 300 px? Not sure where this comes from .
Display Before and After


Additional Information regarding the set up , in case it is related to the way this grid is set up:
I have modified the gridCSS so that it displays according to a spec i received... The Rows are always grouped by the category ...

Regarding the Page / UC set up, I have a Page 1 which uses a Master Template. In the Page, it has 3 states ( 3 custom NON-Telerik TABS ). By default it calls this dynamic UC (call it TAB 1) which has the RadGrid. When I Click on TAB 3, it calls another Dynamic UC replacing the content of the placeholder completely. Now I leave this page to Page 2, then come back to Page 1. This time, because I have a Session variable to save the state of the last Visited TAB in page 1, It loads Page 1 with TAB 3. When I click on TAB 1, to display the RadGrid , this is where this behaviour is obtained.

Pavlina
Telerik team
 answered on 13 Jan 2012
0 answers
90 views
I have inherited a report which has been bound at design time using the front end tools/wizards.
A datasource has been bound to a control but there is another control on the report which wants to use a subset of that datasource. Basically it needs to get the number of records where the addedDate field is within the last 6 months.
I thought I would be able to copy the datasource into a datatable and loop through them chacking the date manually but it wont let me cast the datasource as a datatable.
Any ideas how to work around this?
Paul
Top achievements
Rank 1
 asked on 13 Jan 2012
1 answer
76 views
I am trying to bind a RadGrid to a generic list of business objects using the OnNeedDataSource event. The grid displays the correct number of rows, however, the values for the fields are empty. I can bind to a datasource object without a problem, but I am going to be adding additional functionality where this method will be necessary. For simplicity sake, I am just trying to bind a single exposed property from the custom class object in the list.

.ASPX
<formid="form1"runat="server"
    <telerik:RadScriptManagerID="RadScriptManager1"  runat="server"
            
    </telerik:RadScriptManager
    <div
     <telerik:RadGridrunat="server"AllowPaging="True"ID="RadGrid2"OnNeedDataSource="RadGrid2_NeedDataSource"Width="600px"PageSize="8"
            <MasterTableViewWidth="100%"
                <Columns
                     <telerik:GridBoundColumnHeaderText="Project Name"DataField="name"></telerik:GridBoundColumn
                </Columns
                <NoRecordsTemplate
                    <divstyle="height: 30px; cursor: pointer;"
                        No items to view</div
                </NoRecordsTemplate
                <PagerStyleMode="NumericPages"PageButtonCount="4"/> 
            </MasterTableView
        </telerik:RadGrid
    </div
    </form>

ASPX.VB
Public Class bookmarks 
    Inherits System.Web.UI.Page 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
    
    End Sub 
    Protected Sub RadGrid2_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid2.NeedDataSource 
        RadGrid2.DataSource = getBookMarks 
    End Sub 
    Private ReadOnly Property getBookMarks() As IList(Of project) 
        Get 
            Dim strSQL As String = "SELECT PROJ_NAME FROM [OPI_TIMESHEETS] o left outer join DCSC_PROJECT d on o.project_number = d.PROJ_NO " 
            Dim results As IList(Of project) = New List(Of project)() 
            Using connection As IDbConnection = DbProviderFactories.GetFactory("System.Data.SqlClient").CreateConnection() 
                connection.ConnectionString = ConfigurationManager.ConnectionStrings("projcentral").ConnectionString 
    
                Using command As IDbCommand = connection.CreateCommand() 
                    command.CommandText = strSQL 
    
                    connection.Open() 
                    Try 
                        Dim reader As IDataReader = command.ExecuteReader() 
                        While reader.Read() 
                            Dim name As String = reader.GetValue(reader.GetOrdinal("PROJ_NAME")) 
                            results.Add(New project(name)) 
                        End While 
    
                    Catch ex As SqlException 
                        results.Clear() 
                        'lblmsg.Text = ex.Message 
                    End Try 
                End Using 
            End Using 
            lblMsg.Text = results.Count & " items in list" 
            Return results 
    
        End Get 
    End Property 
    Class project 
    
        Private _projName As String 
    
        Sub New(ByVal name As String) 
    
            _projName = name 
    
        End Sub 
#Region "properties" 
    
        Private ReadOnly Property Name() As String 
            Get 
                Return _projName 
            End Get 
        End Property 
    
#End Region 
    End Class 
    
End Class
Maria Ilieva
Telerik team
 answered on 13 Jan 2012
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?