Announcement

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

    #16
    We don't really follow..

    You can tell when a user has started editing a row because events like EditorEnter / RowEditorEnter happen.

    Comment


      #17
      Sorry, could you clarify by example this moment about EditorEnter, please?

      Originally posted by Isomorphic View Post
      Note that "one" must be a field that exists in the DataSource
      And what about the first question?

      Comment


        #18
        EditorEnter is an event on ListGrid.

        Yes, your sample of a <field> named "one" is correct.

        Comment


          #19
          Thank you for your time! I will try to do it.

          Comment


            #20
            Isomorphic,

            How can I get rowNum to use it in setEditValues() in this case:
            Code:
            editNewButton.addClickHandler(new ClickHandler() {
            			
                @Override
                public void onClick(ClickEvent event) {		
                    groupList.startEditingNew();					
                }
            	
            });

            Comment


              #21
              Isomorphic,

              Now I have another issue. I have 3 columns in ListGrid. And when user start to edit, callback fired and I get some values on the SQL Template, but when user start to edit second column, callback fired again and data from first column losted. How to solve it?
              Code:
              listGrid.addEditorEnterHandler(new EditorEnterHandler() {
              				
              	@Override
              	public void onEditorEnter(EditorEnterEvent event) {
              		int rowNum = event.getRowNum();
              		int MeasureGr = crit.getAttributeAsInt("MeasureGr");
              		int Own = crit.getAttributeAsInt("Own");
              		Map<String, Integer> map = new HashMap<String, Integer>();
              		map.put("MeasureGr", MeasureGr);
              		map.put("Own", Own);
              		listGrid.setEditValues(rowNum, map);					
              	}				
              });

              Comment


                #22
                I also added:
                Code:
                listGrid.addEditorExitHandler(new EditorExitHandler() {
                			
                	@Override
                	public void onEditorExit(EditorExitEvent event) {
                		event.cancel();				
                	}
                });
                But now there is another problem - see ServerLog.txt file please.
                Where I am wrong?
                Attached Files

                Comment


                  #23
                  changing
                  Code:
                  int rowNum = event.getRowNum();
                  in code resolved my issue. )

                  Comment

                  Working...
                  X