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
customize the form Edit Dialog
04/01/2010
23:20
Avatar
miron caius
Guest
Guests

Hello,

The ASP example shows how one can customize the layout of the edit dialog.

http://www.trirand.net/demo.aspx

How can i customize the layout of this form, and add events for different fields ?

04/01/2010
23:52
Avatar
miron caius
Guest
Guests

Found the solution:

add this code:

jQuery("#navgrid").jqGrid('navGrid','#pagernav',
{edit:true,add:false,del:false, search:false}, //options
{ height:360,reloadAfterSubmit:false, top:100,
afterShowForm : hookDatePicker }, // edit options

{height:280,reloadAfterSubmit:false}, // add options

{reloadAfterSubmit:false}, // del options

{sopt:['cn','bw','eq','ne','lt','gt','ew']} // search options
);

and declare a function to threat the event:

function hookDatePicker(formID)
{
               $("#register_date").datepicker({
                   dateFormat: "dd-mm-yy",
                   onSelect: function(dateText, inst) {
                       var grid = jQuery("#<%= JQGrid1.ClientID %>");
                       $("#register_date").datepicker('hide');
                       //grid.saveRow(formID);
                   }
               });
}

04/01/2010
23:53
Avatar
miron caius
Guest
Guests

Also here you have the list of events and properties that can be used for this search dialog:

http://www.trirand.com/jqgridw.....rm_editing

05/01/2010
03:48
Avatar
miron caius
Guest
Guests

I have been trying for a while to change the layout of the edit grid .. but i really need the help. Is their any way other than selecting all the tr by id and changing the html ?

06/01/2010
09:37
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

What you mean with

"Is their any way other than selecting all the tr by id and changing the html ?"

If you want a custom form , you can construct your own and the use FormToGrid and GridToForm methods,

but I do not understand.

Reagrds

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

17/03/2010
01:13
Avatar
Liton
Member
Members
Forum Posts: 4
Member Since:
10/03/2010
sp_UserOfflineSmall Offline

Hi,

I'm also trying to create a custom form where fields will be group together, use field set and other html tags but end up with no luck.Cry I was using the jqgrid.formedit.js

Can you help me or at least point me from where I can start up?

25/03/2010
19:33
Avatar
Liton
Member
Members
Forum Posts: 4
Member Since:
10/03/2010
sp_UserOfflineSmall Offline

I found a way to change the layout of the edit dialog box form the way I want. I use jqgrid.editform.js plugin and change the function "createData" at page around 600. I collect all of the trdata and assing them in some temp variables like

if



(obj.p.colNames[i] === 'A') {

A= trdata.html();

}

else if (obj.p.colNames[i] === 'B') {

B= trdata.html();

}

after that just create the long html strings and put your variables in the places you want .

var xx=<tr><td><table><tr><td><fieldset><legend>Your Message</legend><table><tr>" + A + "</tr><tr><td colspan='4'><table><tr>" + B+ "</tr></table></td></tr><tr><td colspan='4'><fieldset><table><tr>" + C+ "</tr><tr>" +

$(tb).append(xx);

I hope this will help

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
45 Guest(s)

Currently Browsing this Page:
2 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