Announcement

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

    startRow: false does not work with chrome and upload button SC 8.2

    Hi,

    using SmartClient build v82p_2012-07-09

    This code works well in IE/FF and displays an upload item with a button item in one row.
    Code:
    isc.DynamicForm.create({
    	ID: "exampleForm",
    	numCols: 3,
    	cellBorder:1,
    	width: 350,
    	fields: [
    		{
    		name: "file",
    	        showTitle: false,
    		type: "upload"
    	        },
    		{
    		name: "uplaod",
    	        title: "upload",
    	        type: "button",
    		startRow: false
    		}
    	]
    });
    In Chrome the upload item is placed in a second row.

    How can an upload and button item be placed in one row in Chrome?

    Regards Thomas

    #2
    For WebKit (Safari/Chrome) since the native upload control is larger, we default to startRow/endRow:true on UploadItem. So in your sample set endRow:false on the "file" item to put everything on one line.

    Comment


      #3
      yes, I already tried this but this code creates also two rows in chrome
      Code:
      isc.DynamicForm.create({
      	ID: "exampleForm",
      	numCols: 3,
      	cellBorder:1,
      	width: 350,
      	fields: [
      		{
      		name: "file",
      	        showTitle: false,
      		type: "upload",
                      endRow:false
      	        },
      		{
      		name: "uplaod",
      	        title: "upload",
      	        type: "button",
      		startRow: false
      		}
      	]
      });

      Comment


        #4
        Sorry, it's also set to colSpan:"*" by default, so you need colSpan:2 in your code.

        Bear in mind, we did this for a reason (the native control really does need more space), so it might be a good idea to go ahead and leave a full row for the control.

        Comment


          #5
          Thank you for the quick response. Hmm, also with colSpan:2 I´m getting two rows. Could you please post the complete code for one row in Chrome?

          Thank you for the hint with the size. What I try to accomplish is a file upload in a toolbar. One button to chose the file. And one other directly to perform the upload. Therefore I need only one row.

          Code:
          isc.DynamicForm.create({
          	ID: "exampleForm",
                  colSpan:2,
          	numCols: 2,
          	cellBorder:1,
          	width: 350,
          	fields: [
          		{
          		name: "file",
          	        showTitle: false,
          		type: "upload",
                          endRow:false
          	        },
          		{
          		name: "uplaod",
          	        title: "upload",
          	        type: "button",
          		startRow: false
          		}
          	]
          });

          Comment


            #6
            Just add colSpan:2 as directed:

            Code:
            isc.DynamicForm.create({
            	ID: "exampleForm",
            	numCols: 3,
            	cellBorder:1,
            	width: 350,
            	fields: [
            		{
            		name: "file",
            	        showTitle: false,
            		type: "upload",
                            colSpan:2,
                            endRow:false
            	        },
            		{
            		name: "uplaod",
            	        title: "upload",
            	        type: "button",
            		startRow: false
            		}
            	]
            });

            Comment


              #7
              Ah, when you posted new code, you had changed your numCols to 2 instead of 3 as with your first code. colSpan:2 is correct for numCols:3. Use colSpan:1 for numCols:2.

              Comment


                #8
                Yes, thank you very much, that works!

                Comment

                Working...
                X