1. #1
    Sencha User
    Join Date
    Feb 2013
    Location
    Russian federation, Smolensk
    Posts
    38
    Vote Rating
    0
    Answers
    5
    Mike_javaJunior is on a distinguished road

      0  

    Default Unanswered: How to handle the CheckBox state changing

    Unanswered: How to handle the CheckBox state changing


    In my Grid I need to handle the changing of the state of the CheckBox to save changes right after it was changed

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    Russian federation, Smolensk
    Posts
    38
    Vote Rating
    0
    Answers
    5
    Mike_javaJunior is on a distinguished road

      0  

    Default UPD

    UPD


    I tried to do it this way:
    Code:
    column = new ColumnConfig();
            column.setId("accepted");
            column.setHeader("Accepted");
            column.setWidth(55);
    
    
            column.setRenderer(new GridCellRenderer() {
                @Override
                public Object render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore store, Grid grid) {
                    box = new CheckBox();
                    final ListStore<PropertyItem> st = store;
                    box.addListener(Events.CheckChanged, new Listener<CheckChangedEvent>() {
                        @Override
                        public void handleEvent(CheckChangedEvent be) {
                            st.commitChanges();
                            saveProperties(st, customerId, toRemove);
                        }
                    });
    
    
                    return box;
                }
            });
            configs.add(column);
    but the values doesn't correspond the values in the store and doesn't change them

  3. #3
    Sencha User
    Join Date
    Apr 2014
    Posts
    1
    Vote Rating
    0
    alexpo is on a distinguished road

      0  

    Default


    We have similar problem too.
    After adding new item to the Grid previous set CheckBoxes reset those values.
    Any idea how to fix it?

Thread Participants: 1

Tags for this Thread