WHY Silverlight MediaPlayer embedded in GridView not working?

Last post 10-28-2009 7:28 PM by wirol. 2 replies.

Sort Posts:

  • WHY Silverlight MediaPlayer embedded in GridView not working?

    10-28-2009, 12:21 AM
    • Member
      12 point Member
    • wirol
    • Member since 10-28-2009, 12:13 AM
    • Posts 5

    Hi,

    I tried to insert  sliverlight mediaplayer into the item template of GridView. Although it is displaying the control, I can't do anything with it. It's jst like disabled control. Can't play.

     

    Regards,

    wirol 

  • Re: WHY Silverlight MediaPlayer embedded in GridView not working?

    10-28-2009, 7:26 AM
    • All-Star
      36,316 point All-Star
    • rtpHarry
    • Member since 10-01-2006, 12:51 PM
    • Lincoln, England
    • Posts 5,847

    Have you set the file to load? If you just plop a default silverlight player onto a page then I expect that it wont have any items in its playlist so you wouldnt be able to click anything.

    What does your code look like?

  • Re: WHY Silverlight MediaPlayer embedded in GridView not working?

    10-28-2009, 7:28 PM
    • Member
      12 point Member
    • wirol
    • Member since 10-28-2009, 12:13 AM
    • Posts 5

    Hi,

    my code is very simple. If i put the player outside ListView, it plays. It jst don't play inside ListView item template

    <asp:TemplateField>
     <ItemTemplate>
      <asp:MediaPlayer ID="player" runat="server" Width="30px" Height="30px"
            MediaSource="Data/Music/song1.mp3" 
            MediaSkinSource="PlayerSkins/MySkin.xaml">
        </asp:MediaPlayer>
     </ItemTemplate>
    </asp:TemplateField>


     

Page 1 of 1 (3 items)