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
Customize Add/ Edit dialog form
13/09/2011
23:25
Avatar
cruzz
Member
Members
Forum Posts: 3
Member Since:
13/09/2011
sp_UserOfflineSmall Offline

Hi.. I am really new with this !!!

and.. I am trying to tweak a lil the basic forms

I was reading a lot for comments here but I didn't find nothing for my case

I have this part of code for my table table

….

colNames:['Deployment id','Branch', 'Release Name','Client id','# of hosts','Comments',''],
colModel :[

{name:'deployment_id',index:'deployment_id',align:"right", sorttype:"int", width:120},
{name:'branch',index:'branch',align:"center", editable: true,edittype:"select",editoptions:{value:"1:valor1;2:valor2;3:valor3"}},
{name:'release_name',index:'release_name',align:"center"},
{name:'client_id',index:'client_id',align:"right", sorttype:"int", width:60}, {name:'num_hosts',index:'num_hosts',align:"right", sorttype:"int", width:60},
{name:'comments',index:'comments',align:"center", editable: true,edittype:"textarea", editoptions:{rows:"2",cols:"20"}},
{name:'myac', width:80, fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:true}} ],

….

I need modify my edit/add dialog form in order to

When I add: Branch and Comment are available

When I edit: Only Comment can be modified

How I can know When I am Editting or Adding? in both cases are usign the same function "editGridRow"

In addition.. It's possible to get the options values in my Branch name from JSON? or a simple list? How i Can modify the editoptions for that?

Thank you :)

16/09/2011
17:12
Avatar
cruzz
Member
Members
Forum Posts: 3
Member Since:
13/09/2011
sp_UserOfflineSmall Offline

Well... here is the solution....

$("#list").jqGrid('navGrid','#pager',{

edit:true, edittitle: 'Modify a Deployment',

add:true, addtitle: 'Add a new Deployment',

del:true, deltitle: 'Delete a Deployment'},

{// edit option

beforeShowForm: function(form) {

$('#branch', form).attr("disabled","disabled");

},

editCaption: "Edit a Deployment"

},

{// add option

beforeShowForm: function(form) {

$('#branch option[value=""]', form).text('Select a branch')

$('#branch option[value=""]', form).attr("selected", "selected");

$('#branch', form).attr("disabled","");

},

addCaption: "Add a Deploymet"

},

{// delete option

top:50,

left:100,

width:500

},

{// Search option

multipleSearch:true

},

{// view option

}

);

I hope that will be useful for us

Regards

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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