Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
144 views
Hello,

I have a problem with using the radslider control.
In the follwong code I'm using the audio control which I downloaded from http://www.aspnetaudio.com/. I need to control the volume using the radslider control, but unfortunatily, every time I try to do that, the mp3 file is restarted.

<%@ Page Title="<%$ Resources:Resource, PagesConcertsAudioTitle %>" Language="C#" MasterPageFile="~/Pages/MasterPages/DefaultMasterPage.master" AutoEventWireup="true" CodeFile="Audio.aspx.cs" Inherits="Pages_Concerts_Audio" %>
<%@ Register Assembly="ASPNetAudio.NET3" Namespace="ASPNetAudio" TagPrefix="ASPNetAudio" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register Assembly="ASPNetMediaGUI.NET3" Namespace="ASPNetMediaGUI" TagPrefix="ASPNetMediaGUI" %>
  
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
  
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
<asp:Panel ID="AudioPanel" style="margin:10px;" runat="server">
    <asp:SqlDataSource ID="CnsrtsSqlDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ZajalCenterConnectionString %>" 
        SelectCommand="SELECT * FROM [Cnsrts] WHERE ([CnsrtID] = @CnsrtID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="CnsrtID" QueryStringField="cnsrt" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="CnsrtID" Width="100%"
        DataSourceID="CnsrtsSqlDataSource">
        <ItemTemplate>
              
            <asp:Table ID="Table1" Width="100%" runat="server">
                <asp:TableRow ID="TableRow4" runat="server">
                   <asp:TableCell ID="TableCell3" ColumnSpan="2" runat="server">
                         <asp:Label ID="CnsrtNameLabel1" SkinID="HeaderText" runat="server" Text='<%# Bind("CnsrtName") %>' /><br /><br />
                   </asp:TableCell></asp:TableRow><asp:TableRow ID="TableRow7" runat="server">
                   <asp:TableCell ID="TableCell4" style="width:15%;" runat="server">
                       <asp:Label ID="PoetsLabel" runat="server" Text="<%$ Resources:Resource, PagesConcertsAudioPoetsLabel %>" />
                   </asp:TableCell><asp:TableCell ID="TableCell5" HorizontalAlign="Right" style="width:85%;" runat="server">
                       <asp:Label ID="PoetsDataLabel" runat="server" Text='<%# Bind("Choirs") %>' />
                   </asp:TableCell></asp:TableRow><asp:TableRow ID="TableRow1" runat="server">
                    <asp:TableCell ID="TableCell1" ColumnSpan="2" style="width:60%;" runat="server">
                        <asp:Table ID="Table41" Width="100%" runat="server">
                            <asp:TableRow ID="TableRow2" runat="server">
                                <asp:TableCell>
                                    <telerik:RadAjaxPanel ID="AudioRadAjaxPanel" runat="server">
                                        <asp:Table ID="Table2" Width="100%" runat="server">
                                           <asp:TableRow ID="TableRow9" runat="server">
                                               <asp:TableCell ID="TableCell11" ColumnSpan="2" runat="server">
                                                   <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                                                       <ASPNetAudio:Audio ID="MediaPlayer1"  runat="server" >
                                                       </ASPNetAudio:Audio>
                                                     
                                                       <telerik:RadSlider ID="RadSlider_Ticks" runat="server" MinimumValue="0" MaximumValue="100"
                                                            SmallChange="10" LargeChange="10" ItemType="Item" Height="70px" Width="350px" 
                                                            AnimationDuration="400" CssClass="TicksSlider" AutoPostBack="true"  
                                                        ThumbsInteractionMode="Free" onvaluechanged="RadSlider_Ticks_ValueChanged">
                                                        </telerik:RadSlider>
                                                   </telerik:RadAjaxPanel>
                                               </asp:TableCell>
                                           </asp:TableRow>
                                           <asp:TableRow ID="TableRow5" runat="server">
                                               <asp:TableCell ID="TableCell2" style="width:15%;" runat="server">
                                                   <asp:Label ID="DurationLabel" runat="server" Text="<%$ Resources:Resource, PagesConcertsAudioDurationLabel %>"></asp:Label>
                                               </asp:TableCell>
                                               <asp:TableCell ID="TableCell6" HorizontalAlign="Right" style="width:85%;" runat="server">
                                                   <ASPNetMediaGUI:MediaLabel ID="MediaLabel1" runat="server" AssociatedControl="MediaPlayer1" LabelType="Duration"></ASPNetMediaGUI:MediaLabel>
                                               </asp:TableCell>
                                             </asp:TableRow>
                                             <asp:TableRow ID="TableRow6" runat="server">
                                               <asp:TableCell ID="TableCell7" style="width:15%;" runat="server">
                                                   <asp:Label ID="PositionLabel" runat="server" Text="<%$ Resources:Resource, PagesConcertsAudioPositionLabel %>"></asp:Label>
                                               </asp:TableCell>
                                               <asp:TableCell ID="TableCell8" HorizontalAlign="Right" style="width:85%;" runat="server">
                                                   <ASPNetMediaGUI:MediaLabel ID="MediaLabel2" runat="server" AssociatedControl="MediaPlayer1"></ASPNetMediaGUI:MediaLabel>
                                               </asp:TableCell>
                                             </asp:TableRow>
                                             <asp:TableRow ID="TableRow8" runat="server">
                                               <asp:TableCell ID="TableCell9" style="width:15%;" runat="server">
                                                   <asp:Label ID="VolumeLabel" runat="server" Text="<%$ Resources:Resource, PagesConcertsAudioVolumeLabel %>"></asp:Label>
                                               </asp:TableCell>
                                               <asp:TableCell ID="TableCell10" HorizontalAlign="Right" style="width:85%;" runat="server">
                                                   <ASPNetMediaGUI:MediaLabel ID="MediaLabel3" runat="server"  AssociatedControl="MediaPlayer1" LabelType="Volume"></ASPNetMediaGUI:MediaLabel>
                                               </asp:TableCell>
                                             </asp:TableRow>
                                        </asp:Table>
                                          
  
                                        <br />
                                        <div>
                                            <ASPNetMediaGUI:LoadMediaButton ID="LoadMediaButton1" runat="server" AssociatedControl="MediaPlayer1" MediaURL="Cnsrts/Audio/Ajjabal_TaleaHamdan/Track1.mp3"></ASPNetMediaGUI:LoadMediaButton><br />
                                            <ASPNetMediaGUI:PlayButton ID="PlayButton1" runat="server"  AssociatedControl="MediaPlayer1"></ASPNetMediaGUI:PlayButton>
                                            <ASPNetMediaGUI:PauseButton ID="PauseButton1" runat="server" AssociatedControl="MediaPlayer1"></ASPNetMediaGUI:PauseButton>
                                            <ASPNetMediaGUI:StopButton ID="StopButton1" runat="server" AssociatedControl="MediaPlayer1"></ASPNetMediaGUI:StopButton>
                                            <ASPNetMediaGUI:FastForwardButton ID="FastForwardButton1" runat="server" AssociatedControl="MediaPlayer1"></ASPNetMediaGUI:FastForwardButton>
                                            <ASPNetMediaGUI:FastReverseButton ID="FastReverseButton1" runat="server" AssociatedControl="MediaPlayer1"></ASPNetMediaGUI:FastReverseButton>
                                            <ASPNetMediaGUI:MuteButton ID="MuteButton1" runat="server" AssociatedControl="MediaPlayer1"></ASPNetMediaGUI:MuteButton>
                                            <ASPNetMediaGUI:VolumeUpButton ID="VolumeUpButton1"  runat="server" AssociatedControl="MediaPlayer1" Text="+" ></ASPNetMediaGUI:VolumeUpButton>
                                            <ASPNetMediaGUI:VolumeDownButton ID="VolumeDownButton1" runat="server" AssociatedControl="MediaPlayer1" Text="-"></ASPNetMediaGUI:VolumeDownButton><br />
                                        </div>
                                        <br />
                                        <asp:Label ID="PlayListLabel" runat="server" Text="<%$ Resources:Resource, PagesConcertsAudioPlayListLabel %>" ></asp:Label>
                                        <ASPNetMediaGUI:PlayList ID="PlayList1" runat="server" AutoGenerateColumns="False"
                                            CellPadding="4" DataSourceID="DefaultPlayList" GridLines="None" LoopPlayList="True"
                                            MediaPlayer="MediaPlayer1" ShowHeader="False" ForeColor="#333333">
                                            <FooterStyle BackColor="#990000" ForeColor="White" Font-Bold="True" />
                                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                            <AlternatingRowStyle BackColor="White" />
                                            <PlayListTracks>
                                                <ASPNetMediaGUI:PlayListTrack></ASPNetMediaGUI:PlayListTrack>
                                            </PlayListTracks>
                                            <Columns>
                                                <asp:TemplateField ShowHeader="False">
                                                    <itemtemplate>
                                                        <asp:LinkButton ID="TrackSelectButton" runat="server" CausesValidation="False" CommandName="Select" Text='<%# Eval("Name") /*Eval("TrackNumber")+". "+Eval("URL")*/ %>'></asp:LinkButton>
                                                    </itemtemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                                        </ASPNetMediaGUI:PlayList>
                                        <br />
                                        <h3>PlayList Buttons:</h3>
                                        <ASPNetMediaGUI:PlayTrackButton ID="PlayTrackButton1" runat="server"  AssociatedControl="PlayList1"
                                            ButtonType="Link"></ASPNetMediaGUI:PlayTrackButton>
                                        <ASPNetMediaGUI:StopPlayListButton ID="StopPlayListButton1" runat="server" AssociatedControl="PlayList1"
                                            ButtonType="Link"></ASPNetMediaGUI:StopPlayListButton>
                                            <ASPNetMediaGUI:PreviousTrackButton ID="PreviousTrackButton1" runat="server" AssociatedControl="PlayList1" ButtonType="Link"></ASPNetMediaGUI:PreviousTrackButton>
                                        <ASPNetMediaGUI:NextTrackButton ID="NextTrackButton1" runat="server" AssociatedControl="PlayList1" ButtonType="Link"></ASPNetMediaGUI:NextTrackButton>
                                        <br /><br />
                                </telerik:RadAjaxPanel>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow ID="TableRow3" runat="server">
                                <asp:TableCell ID="Table32" runat="server">
                                   
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </asp:TableCell></asp:TableRow></asp:Table></ItemTemplate></asp:FormView></asp:Panel></asp:Content>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZajalControlLibrary;
using ASPNetAudio;
using ASPNetMediaGUI;
using System.Data;
using Telerik.Web.UI;
  
public partial class Pages_Concerts_Audio : BasePage
{
    private DataTable _mediaListDataTable;
    public DataTable MediaListDataTable
    {
        get
        {
            DataLstObjctGetData mediaListObject = new DataLstObjctGetData();
            DataSet _mediaListDataSet = new DataSet();
            _mediaListDataSet = mediaListObject.GetMediaListByID(Convert.ToInt32(Request.QueryString["cnsrt"]));
            _mediaListDataTable = _mediaListDataSet.Tables[0];//.Select("FAQsGrp = '" + Session["GrpName"].ToString() + "'");
            return _mediaListDataTable;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        FormView _formView1 = (FormView)Page.Master.FindControl("ContentPlaceHolder3").FindControl("FormView1");
        PlayList _playList1 = (PlayList)_formView1.FindControl("PlayList1");
        Audio _mediaPlayer1 = (_formView1.FindControl("MediaPlayer1") as Audio);
        foreach (DataRow row in MediaListDataTable.Rows)
        {
            if (row["MTyp"].ToString().Trim().Equals("Audio"))
            {
                PlayListTrack _playListTrack = new PlayListTrack();
                _playListTrack.Name = row["MName"].ToString();
                _playListTrack.URL = "Cnsrts/" + row["MTyp"].ToString().Trim() + "/" + row["MURL"].ToString();
                _playList1.PlayListTracks.Add(_playListTrack);
            }
        }
        _playList1.PlayListTracks.RemoveAt(0);
    }
  
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
          
          
    }
  
      
  
    protected void RadSlider_Ticks_ValueChanged(object sender, EventArgs e)
    {
          
        RadSlider _radSlider_Ticks = (RadSlider)sender;
        FormView _formView1 = (FormView)Page.Master.FindControl("ContentPlaceHolder3").FindControl("FormView1");
        Audio _mediaPlayer1 = (_formView1.FindControl("MediaPlayer1") as Audio);
        _mediaPlayer1.Volume = _radSlider_Ticks.Value;
    }
}

As you can see, there is two buttons which control the volume (VolumeUpButton  and VolumeDownButton ), But I need to control the volum using the RadSlider.

Attached with this post a screen shot of the page.
Please, can you explain to me why the mp3 file is being restarted every time I try to control the volume using the radsilder control.
It is apprecited to send me the modified code which solves the above code.

Regards,
Bader
Tsvetie
Telerik team
 answered on 21 Oct 2010
2 answers
175 views
I'm trying to get information from one list box to populate another list box.  I'm doing a drag and drop from a list box called available to a list box called selected.  After this has been done I would like to populate another list box called selected2 based on what was in the list box called selected.  I'm able of course to get the drap and drop to work but how do you get the id's from the selected list box.

Thanks,
Mike
Michael
Top achievements
Rank 1
 answered on 21 Oct 2010
1 answer
70 views
Hi,

The points on a plotted point chart series appear to be cropped in to half circles. They are plotted exactly on the start axis and end axis edges(see attachment). I would like to see them plotted within the borders, hopefully able to set the padding or margins, whatever needed. X-Axis layout mode is Normal, Y-axis AxisMode is Extended. X-axis value format is shortdate. Please direct me rightly.

Thanks.
Evgenia
Telerik team
 answered on 21 Oct 2010
1 answer
76 views
I am trying to put a Radslider inside the ajaxToolkit:Accordion and it is not getting dis[played. If I have the code outside the ajaxToolkit:Accordion it is getting displayed. How do I get it to display inside the ajaxToolkit:Accordion ?
<!-- this gets displayed -->
<telerik:RadSlider ID="RadSlider1" runat="server" MinimumValue="0" MaximumValue="100"
    SmallChange="5" LargeChange="10" ItemType="tick" Height="70px" Width="350px"
    AnimationDuration="400" CssClass="TicksSlider" ThumbsInteractionMode="Free">
</telerik:RadSlider>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <ajaxToolkit:Accordion ID="MyAccordion" runat="server" SelectedIndex="0"
            HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected"
            ContentCssClass="accordionContent" FadeTransitions="false" FramesPerSecond="40"
            TransitionDuration="250" AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true">
           <Panes>
        <ajaxToolkit:AccordionPane ID="AccordionPane8" runat="server">
                     <Header></Header>
            <Content>
                <!-- this does not displayed -->
                                <telerik:RadSlider ID="RadSlider2" runat="server"
                                    MinimumValue="0" MaximumValue="100"  SmallChange="5" LargeChange="10" ItemType="tick"
                                    AnimationDuration="400" Visible="true">
                                </telerik:RadSlider>
            </Content>          
      </Panes>
        </ajaxToolkit:Accordion>
    </ContentTemplate>
</asp:UpdatePanel>



Tsvetie
Telerik team
 answered on 21 Oct 2010
4 answers
194 views
i have a RadCalenar with different background colors for different days. When the day is selected, the original background color is replaced by the selectedDay style. how can i keep the original background color when the day is selected?
Lisa Simmons
Top achievements
Rank 1
 answered on 21 Oct 2010
1 answer
98 views
Is it possible to stack 2 gridboundcolumns in a single row?   

Thanks.
Tsvetina
Telerik team
 answered on 21 Oct 2010
2 answers
95 views

2010.2.809.35  VS2008 IE8

I have an item that is declarative set to enabled false that cannot be re-enabled with item.enable.   It stays disabled.
If it was NOT declarative disabled then I can disable then enable using the client API.
 
   <telerik:RadListBoxItem Enabled="false" Text="Apple" Value="Apple" />

 var items = listbox.get_items();  items.forEach(function(item) { item.enable(); item.check(); });

Update:  If the item is set to disabled in code, it could not be enabled in Javascript.
Yana
Telerik team
 answered on 21 Oct 2010
1 answer
125 views
On the y axis of my bar chart I have Number of Households.  Obviously, this number is always an integer but I am sometimes getting the following on the y axis:  0, 0.5, 1, 1.5, 2, 2.5, etc.

The plot is coming out correctly.  The x axis shows dates and the plot is usage by y-number of households on a given date.

How can I force the y axis to show only integers?


Thanks.
Evgenia
Telerik team
 answered on 21 Oct 2010
7 answers
670 views
Hi,

I have a RadWIndow, which opens an external ASPX page.
This page has some fields which stores data after clicking the save button.

I want on the click event of the save button, the radwindow should be closed automatically.

Please suggest.

Thanks,
Debashis
Andrey
Top achievements
Rank 1
 answered on 21 Oct 2010
3 answers
354 views
I'd like that when the user press "Enter" on my RadNumericTextBox it would be the same as if he would give a click on a especific button.
The definition of my RadNumericTextBox is:

<telerik:RadNumericTextBox ID="radMyNumericTextBox" runat="server" Width="132px">
        <ClientEvents OnKeyPress="radMyNumericTextBox_KeyDown" />
</telerik:RadNumericTextBox>
My code is:
private void radMyNumericTextBox_KeyDown(object sender, KeyEventArgs e)

 

{

 

    if (e.KeyCode == Keys.Enter)

 

    {

        btnMyButton_Click(sender, e);

    }
}
Note: Actually if I press "Enter" in the RadNumericTextBox close's my window.
Any help?
Thank you very much.

David

Dimo
Telerik team
 answered on 21 Oct 2010
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?