Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Image instead of checkbox
20/10/2010
20:36
Avatar
samarcus971
New Member
Members
Forum Posts: 1
Member Since:
20/10/2010
sp_UserOfflineSmall Offline

Hello,

I try to use image instead of checkbox with a custom formatter but I cant retreive the original value back.

Here is my code

.......

            colModel : [
                    {name:'TXTBLOG', index:'TXTBLOG', width:310, editable:true, sortable:false, edittype:'textarea', 
                           editoptions:{rows:'3',cols:'40', size:200}, editrules:{required:true}}, 
                    {name:'EXPBLOG', index:'EXPBLOG', width:130, editable:true, align:'left', editrules:{required:true}}, 
                    {name:'DTHRPOST', index:'DTHRPOSTBLOG', editable:false, width:80, align:'center', formatter:'DtHrFormat'}, 
                    {name:'QUIVALIDBLOG', index:'QUIVALIDBLOG', editable:true, width:100, align:'center', sortable:true}, 
                    {name:'DTHRVALIDBLOG', index:'DTHRVALIDBLOG', editable:false, width:80, align:'center', formatter:'DtFormat'},
                    {name:'OBSBLOG', index:'OBSBLOG', width:80, editable:true, align:'left', edittype:'textarea', editoptions:{rows:'3',cols:'40', size:20},
                           hidden:true, editrules:{edithidden:true}},
                    {name:'ONVF', index:'ONVF', width:50, align:'center', editable:true, sortable:false, edittype:'checkbox', editoptions:{value:'1:0'}, formatter:'CheckboxCase'}
                         ],
   ......
  
       jQuery.extend($.fn.fmatter , {
             CheckboxCase : function(cellvalue, options, rowdata) {
	       var img_checkbox;
                       var etiquette= TimeStampToDtJscript(rowdata.childNodes[4].textContent, 1);
                       return img_checkbox = cellvalue==0 ? "<img src='crossred.png'  style='border:0' width='12' height='10' originalValue='0' />" : "<img src='images/Icones/cocheverte.png' style='border:0' width='12' height='10'  originalValue='1' />";
                     }

});

         jQuery.extend($.fn.fmatter.CheckboxCase , {
           unformat : function (cellvalue, options, cellObject) {
		              return $(cellObject.html()).attr("originalValue");
           }
       });
First time, when the grid is loaded, images are ok  depending on the value of the checkbox. When I click to edit form (on navigator bar) , the very first time, I get the good value and the checkbox in formedit is correct. But other time, even on the same row, Firebug says "cellObject.html() is not a function". And checked or not, I always get the same value.
Can anyone help me ?
Thanks a lot
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
49 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information