Announcement

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

    listGrid questions

    hi,

    have two questions:
    1. what property is used to define a 'hidden' field?
    2. if putting "height: '100%' ", and adding the listGrid to a window, there is a gray section below the grid, what is that for? how to make it disappear?

    thanks!

    #2
    1. hidden:true
    2. show your code

    Comment


      #3
      a few issues:
      1. dismissOnOutsideClick: doesn't close the window automatically
      2. modal: doesn't block closing the other window
      3. a section below grid.


      Code:
      	isc.ClassFactory.defineClass("DailyView", Dialog);
      	
      	isc.DailyView.addProperties({
      		showTitle: false,
      		showHeader: false,
      		dismissOnOutsideClick: true,
      		autoDraw: false
      	});
      
      	isc.DailyView.addMethods({
      	    initWidget : function () {
      	        
      	        // Always call the superclass implementation when overriding initWidget
      	        this.Super("initWidget", arguments);
      	
      	        this.grid = isc.ListGrid.create({
      	            autoDraw: false,
      	            height: "100%",
      	            width: "100%",
      	            showHeader: false,
      	            recordClick:function (viewer, record, rowNum, field, fieldNum, value, rawValue) {
      	            }
      	        });
      	        this.addItem(this.grid);
      	    },
      	    show: function () {
      	        this.Super("show", arguments);
      	        this.load();
      	    },
      	    getReply: function (data, xmlDoc, rpcResponse, wsRequest){
      ...
      			this.grid.setDataSource(ds);
      		},
      		
      	    load: function() {			    
      		  // get data from database and create datasource
        // call getReply after fetch
      	        );
      	    }
      	    
      	});
      	    
      	isc.DailyView.create({
      	    ID: "DayScheduleList",
      	    autoDraw: false,
      	    visibility: "hidden",
      	    fields:[
      	        { name:"ID", type:"hidden", hidden:"true", width: 25},
      	        { name:"STime", type:"time", useTextField:"true", width:60},
      	        { name:"Name" , width:130}
      		],
      	    top:50
      	})

      Comment


        #4
        You don't appear to have set isModal:true, so modality won't be active and dismissOnOutsideClick also won't work.

        You probably should not extend Dialog, it has components, such as the toolbar, which probably don't apply to your usage and are responsible for the blank space. Extend Window instead.

        Comment

        Working...
        X