Guys,
I need some simple direction to take. I have a Webdatagrid that works fine. I am trying to embed a youtube video into one of the fields and doing some thing simple like:
private void AddVideoPlayer(GridRecord row) { Match m = rxVideo.Match(row.Items[5].Text); string videoUrl = m.Groups[1].Value; string script = GetYouTubeScript(@"http://www.youtube.com/watch?v=JfhsRIDh1RQ"); row.Items[6].Value = script; // Regex.Replace(row.Items[5].Value.ToString(), rxVideo.ToString(), script); }
protected string GetYouTubeScript(string url) { string scr = @"<div><object width='160' height='120'> "; scr = scr + @"<param name='movie' value='" + url + "'></param> "; scr = scr + @"<param name='allowFullScreen' value='true'></param> "; scr = scr + @"<param name='allowscriptaccess' value='always'></param> "; scr = scr + @"<embed src='" + url + "' "; scr = scr + @"type='application/x-shockwave-flash' allowscriptaccess='always' "; scr = scr + @"allowfullscreen='true' width='320' height='240'> "; scr = scr + @"</embed></object></div>"; return scr; }
The grid renders ok, I can see there is a flash object there with a right-click, but the space is blank.
Can you point me in a direction for how to handle this issue?
Dear WirePlay,
Thank you for contacting Infragistics!
We received your support request concerning flash in column, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue.
I am looking into this issue and will get back to you by the end of the day tomorrow with more information or questions for you.
Hello Wireplay,
I suggest you to use the column template to embed the video.
Using a column template allows you to create a column with a unique look-and-feel. You can add any control to the template. A template column in WebDataGrid™ consists of 4 templates: header, footer, item, and alternate item templates.
Please go through the following documentation to know more about template colum
http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=WebDataGrid_Using_Item_Template.html
Please let me know if I can provide any further assistance.
Please let me know if I can provide any further assistance regarding this matter.