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_TopicIcon
Cell Editing
07/01/2011
23:44
Avatar
andy1221
Member
Members
Forum Posts: 9
Member Since:
17/05/2010
sp_UserOfflineSmall Offline

I'm using custom cell editing. Here is my code.

colModel: [{ name: 'name', index: 'name',width:'90px',align:"center",editable:true,classes:"editable",edittype:'custom',editoptions:{custom_element:mycampaignname, custom_value:mycompaignvalue}},......],

// I'm adding div + textbox + save button when that cell is editable: I don't know other way around so I just did this way.

 function mycampaignname (value, options)
                {
                  var eldiv = document.createElement("div");
                  eldiv.value = value;
                  
                  var el = document.createElement("input");
                  el.type ="text";
                  el.value = value;
                  
                  var br = document.createElement('br');
                  
                  var elb = document.createElement("input");
                  elb.type="button";
                  elb.value = "save";
                  elb.style.width="45%";
                  elb.style.styleFloat = "right";
                  elb.onclick = SaveBtnClick;
                  
                  var hiddeninput=document.createElement("input");
                  hiddeninput.id ="hiddenvalue";
                  hiddeninput.value=value;
                 
                  eldiv.appendChild(el);
                  eldiv.appendChild(br);
                  eldiv.appendChild(elb);
                                   return eldiv;
                }
 
                function mycompaignvalue(elem)
                {
                  return $(elem).val();
                }

Now this is working fine upto this point. Now I want to add send data to server on save button click event. How  can I do that?

& Also if I put cancel button along with save then when I click cancel how does cell get back to its original value.(just like when you click on outside editable cell)

Thanks,

A

10/01/2011
17:28
Avatar
andy1221
Member
Members
Forum Posts: 9
Member Since:
17/05/2010
sp_UserOfflineSmall Offline

Can anyone plz tell me is this possible or not? Waiting for reply.

Thanks,

A

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
38 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