Results 1 to 3 of 3

Thread: How to handle the CheckBox state changing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Feb 2013
    Location
    Russian federation, Smolensk
    Posts
    38
    Answers
    5
    Vote Rating
    0
      0  

    Default 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
    Answers
    5
    Vote Rating
    0
      0  

    Default 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
      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?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •