No announcement yet.
  • Filter
  • Time
Clear All
new posts

    ListGrid not updating on removeSelectedData

    I'm using list grid and passing data to list through dynamic form by using addData().
    And i'm saving my data on XML flat files through php.
    When i add data, it works fine. It instantly add data to list grid and my php file update the xml file and append the new data to it.

    But when i try to delete some data from ListGrid by using getSelectedRecord() and removeSelectedData().

    It does send request to my php file to delete that specific entry but grid does not reflect deletion.

    may be this is due to some cache problem. Any solution for this?

    and How can i get rid of cache?

    Hi Loop,

    The DataSource expects you to return *either* the primary keys of the record, or nothing at all. See the RestDataSource example and docs for samples of valid return values.


      List grid not getting refreshed

      Hi Isomorphic,

      I am also facing the same problem, and tried both ways by returning primary key in dsResponse and also by returning null from my Remove method, but still my listgrid is not getting refreshed after calling removeSelectedData.

      I am using SC version 7.0

      Please advice.


        As noted earlier you must return the correct record for the client to know the record was deleted. If you cannot track down your problem with the response, post the server response to the delete request as shown in the developer console.


          Hi David,

          In the same thread, Isomorphic has mentioned that we need to either send the primary key or nothing in the response.

          I tried it both ways, by returning null from my remove method in DMI

          or by setting primary key in dsResponse and returning it back, but nothing worked.


            Correct. Please post your server response. That is where your problem most likely lies. If you are modifying the data in your client dataSource, post that code. Otherwise, there is not much help that can be provided...


              The SmartGWT FAQ on grids not automatically updating contains further troubleshooting steps you should follow (and information to post if you can't seem to get your code working).


                Hi David,

                My server response is


                where dbid is my primary key


                  I've read a few threads now that refer to the "SmartGWT FAQ on grids not automatically updating" however I've had a lot of trouble locating this FAQ. I am going to assume the references are to - this is not just for myself, it'll be for anyone else who views this so please correct me if I'm wrong.

                  Thanks, A
                  Last edited by andrewsharpe79; 17 Jun 2010, 23:53.