[CLOSED] Based on the row selection Iframe should refresh/postback with new selected data (URL).

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Based on the row selection Iframe should refresh/postback with new selected data (URL).

    Hi,


    I have two panels, one panel contains gridpanel and other contains Iframe.

    If I select the row one of the record contains a URL based on the row selection the Iframe should refresh/postback with new selected data (URL)

    But currently its not refreshing/posting back (not calling the iframe src "abc.aspx")

    Please note : our Page loads completely dynamic we cannot find out single control also in markup page(aspx page).

    Thanks,
    vamsi.
    Last edited by Daniil; May 30, 2015 at 2:24 PM. Reason: [CLOSED]
  2. #2
    Hi @Vamsi,

    But currently its not refreshing/posting back (not calling the iframe src "abc.aspx")
    Please demonstrate how do you reload the page?

    Actually, a full runnable test case to reproduce the problem is appreciated.
  3. #3
    Thank You!!!

    Let me explain about how we do..

    In our application all the controls will generate on the fly along with events,validations and soon..

    our code is generic So that's the reason I'm unable to provide code ,if I provide code very difficult to figure it out.

    Here we have one gridpanel and one Iframe (I frame loads different aspx page based on the selected row the details of the row will pass to the aspx page and render the page).

    Based on the every row selection Iframe has to refresh (call the Viewer.aspx)

    Below Iframe src:

    ViewerIFrame = new HtmlGenericControl("iframe");
     ViewerIFrame.ID = fieldList[i].Name;
     ViewerIFrame.Attributes["height"] = Convert.ToString((fieldList[i].Height) * Constants.scaleY);
                                    ViewerIFrame.Attributes["frameBorder"] = "0";
                                    ViewerIFrame.Attributes["scrolling"] = "no";
    ViewerIFrame.Attributes["src"] = "Viewer.aspx?Path=" + Server.UrlEncode(Convert.ToString(Selected data)) 
    
    Placeholder2.Controls.Add(ViewerIFrame);
    Based on the query string the data will fetch from the database and update the same in Iframe.

    above Logic will work if we use Asp.net controls but when integrate the ext.net control(only grid panel) .


    Thanks,
    Vamsi.
    Last edited by Daniil; Apr 27, 2015 at 8:13 PM. Reason: Please use [CODE] tags
  4. #4
    Sorry, I still don't see (or don't understand) how you update the iframe.

    our code is generic So that's the reason I'm unable to provide code ,if I provide code very difficult to figure it out.
    You are right. The complex code might complicated the things.

    But what about to build a simple static test case that would reflect the real scenario that you are dealing with?
  5. #5
    Hi daniel,

    Thank you for the suggestion !

    Please find the row selection event of the grid panel:

    <ext:GridPanel ID="GridPanel1" runat="server" Title="" StoreID="Store1" SelectionMemory="false"
                                EnableViewState="true">                         
                                                                   
                                <SelectionModel>
                                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
                                        <DirectEvents>
                                            <Select OnEvent="GridPanel1_RowSelect">
                                                <ExtraParams>
                                                    <ext:Parameter Name="RowValues" Value="Ext.encode(#{GridPanel1}.getRowsValues({selectedOnly:true}))"
                                                        Mode="Raw" />
                                                </ExtraParams>
                                            </Select>
                                        </DirectEvents>
                                    </ext:RowSelectionModel>
                                </SelectionModel>                          
                            </ext:GridPanel>



    HtmlGenericControl ViewerIFrame = null;
    protected void Page_Load(object sender, EventArgs e)
            {
     ViewerIFrame = new HtmlGenericControl("iframe");
                                    ViewerIFrame.ID = fieldList[i].Name;
     ViewerIFrame.Attributes["height"] = Convert.ToString((fieldList[i].Height) * Constants.scaleY);
                                    ViewerIFrame.Attributes["frameBorder"] = "0";
                                    ViewerIFrame.Attributes["scrolling"] = "no";
    
    Placeholder2.Controls.Add(ViewerIFrame);
    }
    
    
    protected void GridPanel1_RowSelect(object sender, DirectEventArgs e)
            {
                if (isrowEditable == false)
                {
                    string RecData = string.Empty;
                    string valList = string.Empty;
                    string rowValues = e.ExtraParams["RowValues"]; //extra params
    
                    Dictionary<string, string>[] gridRows = JSON.Deserialize<Dictionary<string, string>[]>(rowValues);
    
                    string strName = "";
                    foreach (Dictionary<string, string> row in gridRows)
                    {
                        string insertedTxt = "";
                        foreach (KeyValuePair<string, string> kvp in row)
                        {
                            RecData =  kvp.Key  
                            valList =  kvp.Value ;
    
                        }
                    }
    
                  ViewerIFrame.Attributes["src"] = "WebOTViewer\\Viewer.aspx?Path=" + Server.UrlEncode(Convert.ToString(kvp.Value)) + "&FrameGroup=" + FrameGroup + "&height=" + FrameHeight + "&width=" + FrameWidth + "&isPercentage=" + IsPercentWidth;
                }
    
            }
    Thanks,
    Vamsi.
    Last edited by Vamsi; Apr 28, 2015 at 10:33 AM.
  6. #6
    @Vamsi, we would appreciate if you edit the post wrapping the code in [CODE] tags.

    Please see #3:
    http://forums.ext.net/showthread.php?10205

Similar Threads

  1. Replies: 5
    Last Post: Jul 12, 2013, 3:29 PM
  2. Replies: 1
    Last Post: Dec 20, 2012, 7:30 AM
  3. Refresh GridPanel data on postback event
    By huzzy143 in forum 1.x Help
    Replies: 6
    Last Post: Sep 05, 2011, 7:55 PM
  4. Replies: 2
    Last Post: Aug 09, 2011, 10:38 AM
  5. [CLOSED] loading applet based page in iframe
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 07, 2010, 2:41 AM

Tags for this Thread

Posting Permissions