This is a migrated thread and some comments may be shown as answers.

[Solved] Grid and iFrame src

1 Answer 242 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 30 Apr 2008, 11:08 AM
Hi,
I am using your splitter control..
In the top pane, i have a radgrid
In the bottom pane i have an iFrame..

What i am trying to do is, when the selectedIndex of the grid changes, the iFrame src should change.
I cannot seem to do this..

To test this, i have used (below) but this does not work..

Protected

Sub RadGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.SelectedIndexChanged
Dim

frame1 As HtmlControl = CType(Me.FindControl("frame1"), HtmlControl)frame1.Attributes("src") = http://www.bbc.co.uk"
End
Sub

However, if i place a asp:button on page and place code below in this it works ?!

Thanks
Mark

My grid aspx

<

telerik:RadGrid id="RadGrid1" runat="server" AllowPaging="True" Skin="WebBlue" AllowFilteringByColumn="True"

Width="100%" AllowSorting="True" GridLines="None" >

<MasterTableView AllowPaging="true" >

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

<ExpandCollapseColumn Resizable="False" Visible="False">

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<EditFormSettings>

<PopUpSettings ScrollBars="None" />

</EditFormSettings>

</MasterTableView>

<PagerStyle Mode="NumericPages" Position="Top" />

<ClientSettings EnablePostBackOnRowClick="true">

<Selecting AllowRowSelect="True"></Selecting>

</ClientSettings>

</telerik:RadGrid>

1 Answer, 1 is accepted

Sort by
0
Accepted
Bodevain Svensson
Top achievements
Rank 1
answered on 05 May 2008, 08:51 AM
Can it be that you ajax-enable the grid by RadAjaxManager/RadAjaxPanel without making the splitter an updated control? This may be the reason for the issue.
Another thing you might test is to see whether switching the source for the iframe from another server grid event
(ItemCommand for example) produces the desired result.

Bodevain
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Bodevain Svensson
Top achievements
Rank 1
Share this question
or