|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
how can I get value (not text) from combo in a grid?how can I get value (not text) from combo in a grid?
I have something like this: TabEntete:[...etc...,['string',100,[[1,'maradona'],[2,'van basten']]]]...etc If the user select van basten then with getTabData I get van basten, but I want to get de associated value to van basten, wich is 2. Thanks in advance. hopelessly devoted to rialto |
|
|
Re: how can I get value (not text) from combo in a grid?Hello,
You are true th function didn't exist. I change the getCellData method so that it return the data of the combo array and not the text. Here is a small example var oGrid = new rialto.widget.Grid({top:80,left:5,height:230, arrHeader:[ {title:"Civ",width:100,type:"string",values:[[0,"Mr"],[1,"Mme"],[2,"Mss"\ ]]}, {title:"Surname",width:100,type:"string"}, {title:"Price",width:100,type:"number",pattern:"$ ##.##",maskPattern:"##.###"}, {title:"maried",width:100,type:"boolean",pattern:"no|yes"}, {title:"Date of birth",width:150,type:"date",pattern:"born on dd/MM/yyyy",maskPattern:"dd/MM/yyyy"}], name:'oTableau',parent:document.body,row:12, cellActive:false,sortable:true,multiSelect:false, lineHeight:16,boolPrint:true,switchable:true, clickable:true,autoResizableW:true,autoResizableH:false, writable:true}); //fil grid var tab=new Array; tab.push(["Mr","John",15.48,true,new Date(1945,11,28)]); tab.push(["Mss","Lize",5,false,new Date(1988,5,6)]); tab.push(["Mme","Laura",55,true,new Date(1972,1,23)]); oGrid.fillGridWithData(tab); alert(oGrid.getCellData(0,0)); Just update your Rialto.js file here and tell me if it is ok for you https://svn.improve.fr/rialto/Rialto-coreV1/rialtoEngine/javascript/rial\ to.js Cyril --- In rialto-dev@..., "floorinflo" <floorinflo@...> wrote: > > how can I get value (not text) from combo in a grid? > I have something like this: > TabEntete:[...etc...,['string',100,[[1,'maradona'],[2,'van basten']]]]...etc > If the user select van basten then with getTabData I get van basten, but I want to get de associated value to van basten, wich is 2. > > Thanks in advance. > > hopelessly devoted to rialto > |
|
|
Re: Re: how can I get value (not text) from combo in a grid?Thank you very much!
Because I have done in the past others minor modifications in my rialto.js file I have extracted from your location only rialto.widget.Grid.prototype.getCellData And it's work great! You save my project! Thanks again! PS: and sorry for my double-post! I had have believed that rialto-dev@... and http://www.nabble.com/Rialto-f24017.html are different forums. --- On Tue, 8/4/09, Cyril Balit <cbalit@...> wrote: From: Cyril Balit <cbalit@...> Subject: [rialto-dev] Re: how can I get value (not text) from combo in a grid? To: rialto-dev@... Date: Tuesday, August 4, 2009, 7:26 PM Hello, You are true th function didn't exist. I change the getCellData method so that it return the data of the combo array and not the text. Here is a small example var oGrid = new rialto.widget. Grid({top: 80,left:5, height:230, arrHeader:[ {title:"Civ" ,width:100, type:"string" ,values:[ [0,"Mr"], [1,"Mme"] ,[2,"Mss" ]]}, {title:"Surname" ,width:100, type:"string" }, {title:"Price" ,width:100, type:"number" ,pattern: "$ ##.##",maskPattern: "##.###"} , {title:"maried" ,width:100, type:"boolean" ,pattern: "no|yes"} , {title:"Date of birth",width: 150,type: "date",pattern: "born on dd/MM/yyyy", maskPattern: "dd/MM/yyyy" }], name:'oTableau' ,parent:document .body,row: 12, cellActive:false, sortable: true,multiSelect :false, lineHeight:16, boolPrint: true,switchable: true, clickable:true, autoResizableW: true,autoResizab leH:false, writable:true} ); //fil grid var tab=new Array; tab.push(["Mr" ,"John",15. 48,true,new Date(1945,11, 28)]); tab.push(["Mss" ,"Lize",5, false,new Date(1988,5, 6)]); tab.push(["Mme" ,"Laura", 55,true,new Date(1972,1, 23)]); oGrid.fillGridWithD ata(tab); alert(oGrid.getCellData(0,0)); Just update your Rialto.js file here and tell me if it is ok for you https://svn. improve.fr/ rialto/Rialto- coreV1/rialtoEng ine/javascript/ rialto.js Cyril --- In rialto-dev@yahoogro ups.com, "floorinflo" <floorinflo@. ..> wrote: > > how can I get value (not text) from combo in a grid? > I have something like this: > TabEntete:[. ..etc..., ['string' ,100,[[1, 'maradona' ],[2,'van basten']]]]. ..etc > If the user select van basten then with getTabData I get van basten, but I want to get de associated value to van basten, wich is 2. > > Thanks in advance. > > hopelessly devoted to rialto > |
|
|
Re: how can I get value (not text) from combo in a grid?Thank you very much!
Because I have done in the past others minor modifications in my rialto.js file I have extracted from your location only rialto.widget.Grid.prototype.getCellData And it's work great! You save my project! Thanks again! PS: and sorry for my double-post! I had have believed that rialto-dev@yahoogroups.com and http://www.nabble.com/Rialto-f24017.html are different forums.
|
| Free embeddable forum powered by Nabble | Forum Help |