Announcement

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

    Grouped ListGrid record in edit mode does not allow open of another folder

    Hi,

    I have a ListGrid with records grouped into folders, all closed by default. When I open a folder and click to edit a record, I want to be able to click away to open another folder and switch to editing another record.

    But the other folders will not open until I end editing the row first.

    Is this by design? Is there an override?

    I think that older versions allowed this, but maybe not?

    Also, in order to end editing, I then have to reselect a field, then hit escape. If I just hit escape, it closes the window.

    Thanks,
    Mike


    SmartClient Version: SC_SNAPSHOT-2011-01-05/LGPL Deployment (built 2011-01-05)

    #2
    Can you show a sample (or minimally modified sample) where this happens?

    Comment


      #3
      OK.

      Code:
      isc.ListGrid.create({
          ID:"indtList",
          canEdit: true,
          useCellEvents:true,
          dataSource:"indtRestDS",
          fields:[
      			{name:"indt_cat_name", title:"Category", canEdit:false},
      			{name:"indt_field_name", title:"Field Name", canEdit:false},
      			{name:"indt_note", title:"Notes", length:500, showHover: true},
      			{name:"indt_rush_code", title:"Rush", width:75,
      				editorType: "select",
      				valueMap:["", "1 Day", "3 Day", "5 Day"]
      			},
      			{name:"indt_count", title:"Total Items",
      				formatCellValue:"return isc.Format.toUSString(value)",
      				align:"right",
      				validators:[
      	                {type:"isInteger"}
      	            ]
      			}],
          recordClick: function() {
      
              var record = this.getSelectedRecord();
      
               // do some stuff
             
                 },
          selectionType:"single",
          canEdit: true,
          editEvent: "click",
          groupByField:"indt_cat_name",
          groupStartOpen:"none"
      });
      Last edited by msatkevich; 28 Feb 2011, 15:07.

      Comment


        #4
        We can't run this, it's based on some custom classes. It's also not minimal - if you want an issue looked at please make sure the test case makes it clear that there is a framework issue by being minimal and runnable and clearly indicating a deviation from documented behavior.

        Comment


          #5
          Edits made...

          Is that enough, or do you also need the datasource?

          Thanks,
          Mike

          Comment


            #6
            The DataSource could definitely be involved, yes. The easy thing to do to eliminate any other dependencies or possible need to show server code is to create a client-only DataSource with a row or two of sample data.

            Comment


              #7
              Hi,

              Here's a stand-alone example.

              If you open the Software category and start to edit a line, then try to click on the Hardware category, it won't open the folder.

              I believe in previous versions, it would let you.

              Ideally, I'd like it to save edits automatically and let the user go to whatever folder and item they click next.


              Thanks,
              Mike

              Code:
              
              var testData = [
              {pk:0, orderID:8805, itemDescription:"Anti Virus Suite",
                  category:"Software", shipDate:new Date(2009,10,20), quantity:2 , unitPrice:50 },
              {pk:1, orderID:4833, itemDescription:"USB Ergonomic Keyboard",
                  category:"Hardware", shipDate:new Date(2009,10,13), quantity:1 , unitPrice:99.99 },
              {pk:2, orderID:9551, itemDescription:"Lumbar Support Cushion",
                  category:"Hardware", shipDate:new Date(2010,1,2), quantity:1 , unitPrice:75 },
              {pk:3, orderID:954, itemDescription:"USB Keyboard",
                  category:"Hardware", shipDate:new Date(2009,10,20), quantity:12 , unitPrice:34.99 },
              {pk:4, orderID:616, itemDescription:"Consulting Services",
                  category:"Services", shipDate:new Date(2009,10,10), quantity:40 , unitPrice:100 },
              {pk:5, orderID:8357, itemDescription:"Office Application Suite",
                  category:"Software", shipDate:new Date(2010,2,5), quantity:14 , unitPrice:30 },
              {pk:6, orderID:4582, itemDescription:"Anti Virus Suite",
                  category:"Software", shipDate:new Date(2010,1,20), quantity:22 , unitPrice:50 },
              {pk:7, orderID:9373, itemDescription:"On-site Training",
                  category:"Services", shipDate:new Date(2009,10,20), quantity:20 , unitPrice:100 },
              {pk:8, orderID:9311, itemDescription:"Software Development Kit",
                  category:"Software", shipDate:new Date(2009,10,10), quantity:8 , unitPrice:249.99 },
              {pk:9, orderID:7806, itemDescription:"15 inch flat panel monitor",
                  category:"Hardware", shipDate:new Date(2009,11,12), quantity:4 , unitPrice:300 },
              {pk:10, orderID:8620, itemDescription:"18 inch flat panel monitor",
                  category:"Hardware", shipDate:new Date(2009,11,11), quantity:2 , unitPrice:375 },
              {pk:11, orderID:629, itemDescription:"Office Productivity Suite", 
                  category:"Software", shipDate:new Date(2009,12,10), quantity:15 , unitPrice:64.99 },
              {pk:12, orderID:1264, itemDescription:"Office Productivity Suite",
                  category:"Software", shipDate:new Date(2009,12,20), quantity:2 , unitPrice:64.99 },
              {pk:13, orderID:7100, itemDescription:"USB Ergonomic Keyboard",
                  category:"Hardware", shipDate:new Date(2009,10,20), quantity:6 , unitPrice:99.99 },
              {pk:14, orderID:9647, itemDescription:"Consulting Services",
                  category:"Services", shipDate:new Date(2009,12,21), quantity:10 , unitPrice:100 },
              {pk:15, orderID:8468, itemDescription:"USB Optical Mouse",
                  category:"Hardware", shipDate:new Date(2009,10,10), quantity:5 , unitPrice:29.99 },
              {pk:16, orderID:9496, itemDescription:"Off-site Training",
                  category:"Services", shipDate:new Date(2010,1,1), quantity:35 , unitPrice:80 },
              {pk:17, orderID:5124, itemDescription:"USB Stereo Headset",
                  category:"Hardware", shipDate:new Date(2009,10,20), quantity:1 , unitPrice:69.99 },
              {pk:18, orderID:1799, itemDescription:"Office Application Suite",
                  category:"Software", shipDate:new Date(2009,11,2), quantity:22 , unitPrice:30 },
              {pk:19, orderID:7020, itemDescription:"Consulting Services",
                  category:"Services", shipDate:new Date(2009,12,20), quantity:100 , unitPrice:80 }
              ];
              
              isc.DataSource.create({
                  ID:"orderItemLocalDS",
                  clientOnly:true,
                  testData:testData,
                  fields:[
                      {name:"pk", type:"sequence", primaryKey:"true", hidden:"true"},
                      {name:"orderID", type:"integer", canEdit:false, title:"Order ID", pluralTitle:"Orders"},
                      {name:"itemDescription", type:"text", title:"Description"},
                      {name:"category", type:"text", title:"Category"},
                      {name:"shipDate", type:"date", title:"Ship Date"},
                      {name:"quantity", type:"integer", title:"Quantity"},
                      {name:"unitPrice", type:"float", title:"Price"}
                  ]
              });
                
               
                 
                 
               
              
              isc.ListGrid.create({
                  ID: "companyList",
                  width:600,
              	height:520,
                  alternateRecordStyles:true,
                  autoFetchData:true,
                  dataSource:orderItemLocalDS,
                  showAllRecords:true,
                  groupByField:"category",
              	groupStartOpen:"none",
                  canEdit:true,
              	editEvent:"click",
                  fields:[
                      {name:"orderID", includeInRecordSummary:false, summaryFunction:"count"},
                      {name:"itemDescription"},
                      {name:"category", showGridSummary:true, 
                          getGridSummary:function (records, summaryField) {
                              var seenCategories = {};
                              for (var i = 0; i < records.length; i++) {
                                  seenCategories[records[i].category] = true;
                              }
                              var totalCategories = isc.getKeys(seenCategories).length;
                              return totalCategories + " Categories";
                              
                          }
                      },
                      {name:"shipDate", showGroupSummary:true, showGridSummary:false, summaryFunction:"max"},
                      
                      {name:"quantity", showGroupSummary:false, showGridSummary:false},
                      {name:"unitPrice", showGroupSummary:false, showGridSummary:false,
                       formatCellValue:function (value) {
                           if (isc.isA.Number(value)) {
                              return value.toCurrencyString("$");
                           }
                           return value;
                       }
                      },
                      {name:"Total", type:"summary", recordSummaryFunction:"multiplier",
                       summaryFunction:"sum",
                       showGridSummary:true, showGroupSummary:true,
                       align:"right",
                       formatCellValue:function (value) {
                           if (isc.isA.Number(value)) {
                              return value.toCurrencyString("$");
                           }
                           return value;
                       }
                      }
                  ]
              });

              Comment


                #8
                Hi,

                If you open the Software category and start to edit a line, then try to click on the Hardware category, it won't open the folder.

                I believe in previous versions, it would let you.

                Ideally, I'd like it to save edits automatically and let the user go to whatever folder and item they click next.


                Thanks,
                Mike

                SmartClient Version: SC_SNAPSHOT-2011-01-05/LGPL Deployment (built 2011-01-05)

                Code:
                
                var testData = [
                {pk:0, orderID:8805, itemDescription:"Anti Virus Suite",
                    category:"Software", shipDate:new Date(2009,10,20), quantity:2 , unitPrice:50 },
                {pk:1, orderID:4833, itemDescription:"USB Ergonomic Keyboard",
                    category:"Hardware", shipDate:new Date(2009,10,13), quantity:1 , unitPrice:99.99 },
                {pk:2, orderID:9551, itemDescription:"Lumbar Support Cushion",
                    category:"Hardware", shipDate:new Date(2010,1,2), quantity:1 , unitPrice:75 },
                {pk:3, orderID:954, itemDescription:"USB Keyboard",
                    category:"Hardware", shipDate:new Date(2009,10,20), quantity:12 , unitPrice:34.99 },
                {pk:4, orderID:616, itemDescription:"Consulting Services",
                    category:"Services", shipDate:new Date(2009,10,10), quantity:40 , unitPrice:100 },
                {pk:5, orderID:8357, itemDescription:"Office Application Suite",
                    category:"Software", shipDate:new Date(2010,2,5), quantity:14 , unitPrice:30 },
                {pk:6, orderID:4582, itemDescription:"Anti Virus Suite",
                    category:"Software", shipDate:new Date(2010,1,20), quantity:22 , unitPrice:50 },
                {pk:7, orderID:9373, itemDescription:"On-site Training",
                    category:"Services", shipDate:new Date(2009,10,20), quantity:20 , unitPrice:100 },
                {pk:8, orderID:9311, itemDescription:"Software Development Kit",
                    category:"Software", shipDate:new Date(2009,10,10), quantity:8 , unitPrice:249.99 },
                {pk:9, orderID:7806, itemDescription:"15 inch flat panel monitor",
                    category:"Hardware", shipDate:new Date(2009,11,12), quantity:4 , unitPrice:300 },
                {pk:10, orderID:8620, itemDescription:"18 inch flat panel monitor",
                    category:"Hardware", shipDate:new Date(2009,11,11), quantity:2 , unitPrice:375 },
                {pk:11, orderID:629, itemDescription:"Office Productivity Suite", 
                    category:"Software", shipDate:new Date(2009,12,10), quantity:15 , unitPrice:64.99 },
                {pk:12, orderID:1264, itemDescription:"Office Productivity Suite",
                    category:"Software", shipDate:new Date(2009,12,20), quantity:2 , unitPrice:64.99 },
                {pk:13, orderID:7100, itemDescription:"USB Ergonomic Keyboard",
                    category:"Hardware", shipDate:new Date(2009,10,20), quantity:6 , unitPrice:99.99 },
                {pk:14, orderID:9647, itemDescription:"Consulting Services",
                    category:"Services", shipDate:new Date(2009,12,21), quantity:10 , unitPrice:100 },
                {pk:15, orderID:8468, itemDescription:"USB Optical Mouse",
                    category:"Hardware", shipDate:new Date(2009,10,10), quantity:5 , unitPrice:29.99 },
                {pk:16, orderID:9496, itemDescription:"Off-site Training",
                    category:"Services", shipDate:new Date(2010,1,1), quantity:35 , unitPrice:80 },
                {pk:17, orderID:5124, itemDescription:"USB Stereo Headset",
                    category:"Hardware", shipDate:new Date(2009,10,20), quantity:1 , unitPrice:69.99 },
                {pk:18, orderID:1799, itemDescription:"Office Application Suite",
                    category:"Software", shipDate:new Date(2009,11,2), quantity:22 , unitPrice:30 },
                {pk:19, orderID:7020, itemDescription:"Consulting Services",
                    category:"Services", shipDate:new Date(2009,12,20), quantity:100 , unitPrice:80 }
                ];
                
                isc.DataSource.create({
                    ID:"orderItemLocalDS",
                    clientOnly:true,
                    testData:testData,
                    fields:[
                        {name:"pk", type:"sequence", primaryKey:"true", hidden:"true"},
                        {name:"orderID", type:"integer", canEdit:false, title:"Order ID", pluralTitle:"Orders"},
                        {name:"itemDescription", type:"text", title:"Description"},
                        {name:"category", type:"text", title:"Category"},
                        {name:"shipDate", type:"date", title:"Ship Date"},
                        {name:"quantity", type:"integer", title:"Quantity"},
                        {name:"unitPrice", type:"float", title:"Price"}
                    ]
                });
                  
                 
                   
                   
                 
                
                isc.ListGrid.create({
                    ID: "companyList",
                    width:600,
                	height:520,
                    alternateRecordStyles:true,
                    autoFetchData:true,
                    dataSource:orderItemLocalDS,
                    showAllRecords:true,
                    groupByField:"category",
                	groupStartOpen:"none",
                    canEdit:true,
                	editEvent:"click",
                    fields:[
                        {name:"orderID", includeInRecordSummary:false, summaryFunction:"count"},
                        {name:"itemDescription"},
                        {name:"category", showGridSummary:true, 
                            getGridSummary:function (records, summaryField) {
                                var seenCategories = {};
                                for (var i = 0; i < records.length; i++) {
                                    seenCategories[records[i].category] = true;
                                }
                                var totalCategories = isc.getKeys(seenCategories).length;
                                return totalCategories + " Categories";
                                
                            }
                        },
                        {name:"shipDate", showGroupSummary:true, showGridSummary:false, summaryFunction:"max"},
                        
                        {name:"quantity", showGroupSummary:false, showGridSummary:false},
                        {name:"unitPrice", showGroupSummary:false, showGridSummary:false,
                         formatCellValue:function (value) {
                             if (isc.isA.Number(value)) {
                                return value.toCurrencyString("$");
                             }
                             return value;
                         }
                        },
                        {name:"Total", type:"summary", recordSummaryFunction:"multiplier",
                         summaryFunction:"sum",
                         showGridSummary:true, showGroupSummary:true,
                         align:"right",
                         formatCellValue:function (value) {
                             if (isc.isA.Number(value)) {
                                return value.toCurrencyString("$");
                             }
                             return value;
                         }
                        }
                    ]
                });

                Comment


                  #9
                  *bump reply*

                  Comment


                    #10
                    Any ideas about this one?

                    Thanks,
                    Mike

                    Comment

                    Working...
                    X