General operation of sub table

Time:2022-5-21

Common methods of sub table front end

//Clear child table rows
        // that.D002033Ffbcf094aa84f4affa531681d4516a100.ClearRows();

        //Add child table row 
        // var controlManager = this. D002033Ffbcf094aa84f4affa531681d4516a100;// Get sub table control object
        // var subObjectId = $. IGuid();  // Create row ID
        // controlManager.AddRow( subObjectId, {

        //"D002033ffbcf094aa84f4affa531681d4516a100. F0000001": "hello", // add data to sub table rows


        // })

        //Update child table rows
        // var currentRowId = this. D002033Ffbcf094aa84f4affa531681d4516a100. GetValue()[ 1 ]. ObjectId; // First row sub table ID                     
        // this.D002033Ffbcf094aa84f4affa531681d4516a100.UpdateRow( currentRowId, {

        //"D002033ffbcf094aa84f4affa531681d4516a100. F0000001": "bad",

        // });

        //Traversal sub table object
        var zibiao= this.D002033Ffbcf094aa84f4affa531681d4516a100.GetValue();
        for( var i = 0;i < zibiao.length;i++ ) {
            var currentRowId = zibiao[ i ].ObjectId;
            this.D002033Ffbcf094aa84f4affa531681d4516a100.UpdateRow( currentRowId, {

                "D002033ffbcf094aa84f4affa531681d4516a100. F0000001": "bad",

            });

 

Main table text binding event

//Main table text binding event
        that.F0000001.BindChange('key',function(){
            Alert ("it's time to change");
        })

Event of sub table clicking this table

//Event binding of a field in the sub table
        that.D002033Ffbcf094aa84f4affa531681d4516a100.BindChange( 'key', function( res ) {
            if( res[ 0 ].DataField == "D002033Ffbcf094aa84f4affa531681d4516a100.F0000001" ) {
                Alert ("click this button to change");
            }
        })

After a text in the sub table is written, other specific text cannot be written

      that.D002033Ffbcf094aa84f4affa531681d4516a100.BindChange( 'key', function( res ) {
            if( res[ 0 ].DataField == "D002033Ffbcf094aa84f4affa531681d4516a100.F0000001" ) {
                var objectid = res[ 0 ].ObjectId;
                var cellObj = that.D002033Ffbcf094aa84f4affa531681d4516a100.GetCellManager( objectid, "D002033Ffbcf094aa84f4affa531681d4516a100.F0000003" );
                cellObj.SetReadonly( true );
            

The minimum value of the sub table uses the function min(); The maximum value is in man ();