1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Tasmania
    Posts
    3
    Vote Rating
    0
    Vantage77 is on a distinguished road

      0  

    Default How do I remove a cell's value after a GridEvent has fired on that cell?

    How do I remove a cell's value after a GridEvent has fired on that cell?


    I have a Grid where I set values for the cells, based on a boolean: i.e. if true, then the cell is populated with "true", otherwise I return "". That's all fine.

    However, I have added a listener to the column (where a cell is populated with a value, courtesy of a GridCellRenderer) and after performing some business logic, if the cell is clicked, I wish to remove the value for the cell that has been clicked. The reason is that it's value only applies PRIOR to the business logic having been performed: once the business part is complete, I don't want the user to have the choice of clicking that cell anymore.

    I can, of course hide the column (via the ColumnConfig) but this is not optimum if another cell in that column (i.e. a seperate record) also has a value but it hasn't been clicked (therefore no GridEvent has been applied).

    My need therefore, is Cell-specific: if clicked, do something, then remove value for that cell only.

    Incidentally, forum and site is great to follow, especially to a novice like me.

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Location
    Tasmania
    Posts
    3
    Vote Rating
    0
    Vantage77 is on a distinguished road

      0  

    Default One possibility?

    One possibility?


    I could try the following approach:

    grid.getView().getCell(gridEvent.getRowIndex(), columnNumber).setInnerText("");

    I'm yet to verify this as a solution.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Location
    Tasmania
    Posts
    3
    Vote Rating
    0
    Vantage77 is on a distinguished road

      0  

    Default Solved.

    Solved.


    My proposed solution did in fact produce the required result.
    HOWEVER, it was always going to remain a momentary fix until the next call on the DB was made, which would simply rewrite the cells with whatever the data was at the time of the new call!!
    Therefore my real solution involved updating the data in the DB correctly (which, it turns out I wasn't. ).
    So the upshot is: let the DB feed the cells with the data sought; JUST ENSURE YOU HAVE MADE THE RIGHT DATA MANIPULATION CALLS FIRST! Fix the back-end work and the I/F will be populated accordingly.
    So says the novice!

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi