content inside rowexpander template won't update

Page 1 of 2 12 LastLast
  1. #1

    content inside rowexpander template won't update

    hi there i have a grid panel, the problem is if i call a server side update of the grid panel content, the content of the grid row is updated, but the text inside the row expander does not get updated.


    server side update
    
            [AjaxMethod]
            public void bindQuestionSetContent_AM()
            {
                int pqsid = Convert.ToInt32(hdnParentWinQSID.Value);
                try
                {
                    bindQuestionSetContent(pqsid, ....................);
                    extgpMyQS_SelectionModel.ClearSelections();
                }
                catch
                {
                    bindQuestionSetContent(pqsid);
                }
            }
    
            private void bindQuestionSetContent(int pqsid, int selectedview)
            {
                try
                {
                    DataTable dtMyQSContent = ...............;
                    extstorePQS.DataSource = dtMyQSContent;
                    extstorePQS.DataBind();
                }
                catch (Exception ex)
                {
                    .....................
                }
            }
    
    <ext:RowExpander ID="RowExpander1" runat="server" ColumnPosition="1"  >
                                        <Template ID="Template1" runat="server">
                                            <p>About this Question: {description}</p>
                                        </Template>
                                        <Listeners>
                                            <BeforeExpand Fn="descriptionExpanded" />
                                            <Expand Fn="descriptionExpandedDone" />
                                        </Listeners>
                                    </ext:RowExpander>
                                    <ext:GridPanelMaintainScrollPositionOnRefresh runat="server"></ext:GridPanelMaintainScrollPositionOnRefresh>
    {description} does not get updated
  2. #2

    RE: content inside rowexpander template won't update

    i tried deleting the cache but the old value still persists on the row expander the content... the only time it gets an updated value is when i reload the whole page, but it is not getting updated if i do an update using an ajaxmethod

    please note that i am using coolite v.0.8.2
  3. #3

    RE: content inside rowexpander template won't update

    Hi,

    Try to add the following custom config to the RowExpander plugin
    <ext:ConfigItem Name="enableCaching" Value="false" Mode="Raw" />
    Vladimir Shcheglov
    Sr. Developer
  4. #4

    RE: content inside rowexpander template won't update

    ok, that solves it but the row expander content gets removed after grid reload whenever the row expander is expanded
  5. #5

    RE: content inside rowexpander template won't update

    Hi,

    Then remove enableCaching and register the following script after data rebinding
    GridPanel1.AddScript("{0}.view.refreshRow({0}.store.getById('{1}'));", GridPanel1.ClientID, RequiredRecordId);
    Vladimir Shcheglov
    Sr. Developer
  6. #6

    RE: content inside rowexpander template won't update

    the store.getById('{1}') uses the recordID column right? not necessarily the column with the name "id"
  7. #7

    RE: content inside rowexpander template won't update

    i may not be able to get the record id of that row because of some complicated thing, i now resorted to just updating the row body on row expander expand, the problem is it still won't change even if i do this on the beforeexpand listener

    
    expandedRow = rowIndex; 
    var row = expander.grid.view.getRow(rowIndex);
    var body = Ext.DomQuery.selectNode('tr div.x-grid3-row-body', row);
    body.innerHTML = "<p>About this Question:" + record.get("description") + "</p>";
    record.get("description") is already updated when the function is triggered but doing body.innerHTML doesn't seem to change the row expander body
  8. #8

    RE: content inside rowexpander template won't update

    Hi,

    If you don't id then use row index
    GridPanel1.AddScript("{0}.view.refreshRow({0}.store.getAt({1}));", GridPanel1.ClientID, Index);
    Vladimir Shcheglov
    Sr. Developer
  9. #9

    RE: content inside rowexpander template won't update

    i am calling this on the row expander rowExpanded listener but it is not updating

    expander.grid.view.refreshRow(expander.grid.store.getAt(rowIndex));
  10. #10

    RE: content inside rowexpander template won't update

    Hi,

    You have to call it after data rebinding, for example in the success handler of the AjaxMethod which rebinds data
    Vladimir Shcheglov
    Sr. Developer
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: Oct 19, 2010, 8:39 AM
  2. [CLOSED] [1.0] GridPanel RowExpander Template
    By state in forum 1.x Premium Help
    Replies: 1
    Last Post: Jan 13, 2010, 9:36 AM
  3. Replies: 2
    Last Post: Sep 23, 2009, 6:49 PM
  4. [CLOSED] grid rowexpander template
    By idrissb in forum 1.x Premium Help
    Replies: 4
    Last Post: Sep 10, 2009, 3:01 AM
  5. Replies: 5
    Last Post: Apr 28, 2009, 9:43 PM

Posting Permissions