Forum


23:20

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 ?
23:52

Found the solution:
add this code:
{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:
{
$("#register_date").datepicker({
dateFormat: "dd-mm-yy",
onSelect: function(dateText, inst) {
var grid = jQuery("#<%= JQGrid1.ClientID %>");
$("#register_date").datepicker('hide');
//grid.saveRow(formID);
}
});
}
23:53

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
09:37

Moderators
30/10/2007

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.
19:33

10/03/2010

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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66