Loading ...
Sorry, an error occurred while loading the content.
 

reloading js_array datasource when data changes

Expand Messages
  • digitalzeitgeist
    I have a datatable constructed off a js_array datasource, and when the underlying array gets changed elsewhere in my app, I need to refresh the datatable. Is
    Message 1 of 4 , Aug 29 4:38 PM
      I have a datatable constructed off a js_array datasource, and when the
      underlying array gets changed elsewhere in my app, I need to refresh
      the datatable. Is there an easy way to do this??? Just destroying
      the old datatable and creating a new one comes to mind, but surely
      there is an easier way with less overhead.
    • Lucas Smith
      ... You can do: myDataSource.sendRequest(null,{ success: myDataTable.onDataReturnInitializeTable, scope: myDataTable }); Hope this helps, Luke
      Message 2 of 4 , Aug 29 11:10 PM
        --- In ydn-javascript@yahoogroups.com, "digitalzeitgeist"
        <digitalzeitgeist@...> wrote:
        >
        > I have a datatable constructed off a js_array datasource, and when the
        > underlying array gets changed elsewhere in my app, I need to refresh
        > the datatable. Is there an easy way to do this??? Just destroying
        > the old datatable and creating a new one comes to mind, but surely
        > there is an easier way with less overhead.
        >

        You can do:
        myDataSource.sendRequest(null,{
        success: myDataTable.onDataReturnInitializeTable,
        scope: myDataTable
        });

        Hope this helps,
        Luke
      • digitalzeitgeist
        ... I d tried variations on that, but never could quiet figure the right params out. Works great - thanks so much!
        Message 3 of 4 , Aug 30 8:55 AM
          > > I have a datatable constructed off a js_array datasource, and when the
          > > underlying array gets changed elsewhere in my app, I need to refresh
          > > the datatable. Is there an easy way to do this??? Just destroying
          > > the old datatable and creating a new one comes to mind, but surely
          > > there is an easier way with less overhead.
          > >
          >
          > You can do:
          > myDataSource.sendRequest(null,{
          > success: myDataTable.onDataReturnInitializeTable,
          > scope: myDataTable
          > });

          I'd tried variations on that, but never could quiet figure the right
          params out. Works great - thanks so much!
        • Satyam
          There is no other parameters from those you see. Simply replace those myXXXX with yourXXXX, however you called them, that s all. Satyam
          Message 4 of 4 , Aug 30 2:13 PM
            There is no other parameters from those you see. Simply replace those
            myXXXX with yourXXXX, however you called them, that's all.

            Satyam


            digitalzeitgeist wrote:
            >>> I have a datatable constructed off a js_array datasource, and when the
            >>> underlying array gets changed elsewhere in my app, I need to refresh
            >>> the datatable. Is there an easy way to do this??? Just destroying
            >>> the old datatable and creating a new one comes to mind, but surely
            >>> there is an easier way with less overhead.
            >>>
            >>>
            >> You can do:
            >> myDataSource.sendRequest(null,{
            >> success: myDataTable.onDataReturnInitializeTable,
            >> scope: myDataTable
            >> });
            >>
            >
            > I'd tried variations on that, but never could quiet figure the right
            > params out. Works great - thanks so much!
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
            > ------------------------------------------------------------------------
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - http://www.avg.com
            > Version: 8.0.169 / Virus Database: 270.6.13/1642 - Release Date: 29/08/2008 18:12
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.