Sigma Php Ajax framework, Ajax Components, GUI Builder
May 16, 2012, 11:18:17 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: about sigma2.4 sorting  (Read 1914 times)
cxjava
Jr. Member
**
Posts: 9


View Profile
« on: May 31, 2010, 01:24:34 AM »

 Cheesy
hi,steven,
why in the sigma2.4,the sorting only has "desc" and "asc" ,don't has 'defaultsort'

in the sigma2.2,it has.
Logged
cxjava
Jr. Member
**
Posts: 9


View Profile
« Reply #1 on: May 31, 2010, 01:43:46 AM »

it has a Config:editable : true,
              sortable:true,
             enableDefaultSort:true,
             sortOrder:'asc',

but ,sometimes:"sortInfo":[{"columnId":"age","fieldName":"age","sortOrder":"defaultsort","getSortValue":null,"sortFn":null}],
it has only one,
sometimes:sortInfo":[{"columnId":"age","fieldName":"age","sortOrder":"defaultsort","getSortValue":null,"sortFn":null},{"columnId":"name","fieldName":"name","sortOrder":"asc","getSortValue":null,"sortFn":null}]
it has two,why?

  var colsOption = [{
             id : 'chk',
             isCheckColumn : true
          }, {
             id : 'id',
             header : "ID",
             headAlign : 'center',
             align : 'center',
             editable : false,
             sortable:true,
             sortOrder:'desc',
             width : 50
          }, {
             id : 'name',
             header : "姓名",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:false,
             width : 100,
             renderer : Sigma.Grid.mappingRenderer(province, '未知省份'),
             editor : {
                type : "text",
                validRule : ['R']
             }
          }, {
             id : 'age',
             header : "年龄",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:true,
              enableDefaultSort:true,
             sortOrder:'asc',
             width : 100,
             editor : {
                type : "text",
                validRule : ['R']
             }
          }, {
             id : 'birthday',
             header : "生日",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:false,
             width : 150,
             editor : {
                type : 'text',
                validRule : ['R', 'date']
             }
          }, {
             id : 'address',
             header : "地址",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:false,
             toolTip : true,// 鼠标悬停指示
             toolTipWidth : 150,
             width : 150,
             emptyText : '此项为空',
             editor : {
                type : 'text',
                validRule : ['R']
             }
          }];

Logged
cxjava
Jr. Member
**
Posts: 9


View Profile
« Reply #2 on: May 31, 2010, 02:12:28 AM »

i set like this:
  var colsOption = [{
             id : 'id',
             header : "ID",
             headAlign : 'center',
             align : 'center',
             editable : false,
             sortable:false,
             sortOrder:'desc',
             width : 50
          }, {
             id : 'name',
             header : "姓名",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:true,
              sortOrder:'desc',
             width : 100,
             renderer : Sigma.Grid.mappingRenderer(province, '未知省份'),
             editor : {
                type : "text",
                validRule : ['R']
             }
          }, {
             id : 'age',
             header : "年龄",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:false,
             sortOrder:'asc',
             width : 100,
             editor : {
                type : "text",
                validRule : ['R']
             }
          }, {
             id : 'birthday',
             header : "生日",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:false,
             width : 150,
             editor : {
                type : 'text',
                validRule : ['R', 'date']
             }
          }, {
             id : 'address',
             header : "地址",
             headAlign : 'center',
             align : 'center',
             editable : true,
              sortable:true,
              sortOrder:'desc',
             toolTip : true,// 鼠标悬停指示
             toolTipWidth : 150,
             width : 150,
             emptyText : '此项为空',
             editor : {
                type : 'text',
                validRule : ['R']
             }
          }];

but it send to the service the sortInfo like this:
"sortInfo":[{"columnId":"address","fieldName":"address","sortOrder":"desc","getSortValue":null,"sortFn":null}],
why it only has 'address', where is name?
"{"columnId":"name","fieldName":"name","sortOrder":"desc","getSortValue":null,"sortFn":null}"

明白我的意思了吗?See what I mean? Do U know what i mean?
Logged
cxjava
Jr. Member
**
Posts: 9


View Profile
« Reply #3 on: May 31, 2010, 02:45:37 AM »

multiSort:true,//是否把所有的排序都提交到服务器,否则只提交最后一个字段的排序信息到服务器
          submitUpdatedFields : true,//只提交更新了的字段到服务器,
只要设置这个multiSort:true,就能把所有你设置的排序信息提交到服务器了,

我还有个问题啊:
_gt_json   {"fieldsName":["id","name","age","birthday","address"],"recordType":"object","parameters":{"CHENXIN":"SHICHUAN"},"updatedFields":[{"birthday":"1987-01-29","id":102},{"birthday":"1987-01-24","id":103}],"action":"save","insertedRecords":[],"updatedRecords":[{"age":4,"birthday":"1987-01-29","address":"请输入地址","name":"请输入姓名","id":102},{"age":5,"birthday":"1987-01-24","address":"请输入地址","name":" 请输入姓名","id":103}],"deletedRecords":[]}
我能不能只提交这个参数:"updatedFields":[{"birthday":"1987-01-29","id":102},{"birthday":"1987-01-24","id":103}],
因为这个参数已经够了,不想再提交这个参数:"updatedRecords":[{"age":4,"birthday":"1987-01-29","address":"请输入地址","name":"请输入姓名","id":102},{"age":5,"birthday":"1987-01-24","address":"请输入地址","name":" 请输入姓名","id":103}],
这样可以减少服务器的压力,我知道有2个事件是:beforeSave和beforeUpdate,但是我想问下,有没有直接设置的属性呢?不用在事件里面进行加工。
Logged
xiaole_zhm
Newbie
*
Posts: 4


View Profile
« Reply #4 on: June 09, 2010, 01:26:13 AM »

你好,知道如何在最后一行添加统计值吗?
Logged
cxjava
Jr. Member
**
Posts: 9


View Profile
« Reply #5 on: June 17, 2010, 12:08:11 AM »

你可以试一试用jquery来操作一下
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!