Forum


11:41

I have a Grid I'm using Form Edit, and trying to set the caption to something other than the default 'Edit Record'. So, using beforeShowForm, and the “Form ID is passed” theory I thought the format should be:
beforeShowForm:function setTitle(formID) {
alert(”beforeShowData”);
formID.editGridRow(”rowID”,{setCaption:”foo”});
},
What should I be using to set the Caption (Or topinfo – that would be fine too).
Thanks
Martin
18:46

I'm trying to set it in the before show form of the edit action.
When the user selects a row of the grid to edt, I want to set either the caption or the top info to the value of a col in the selected row. Hence the Caption of the edit-form needs to change depending on the selected row.
The documentation says that the edit form ID is passed to the BeforeShow Form, and that the topinfo is passed into the function, and the various attributes are passed as parameters but I can't figure out how to set them.
Thx
Martin
22:52

Hi,
Thanks for the help. Maybe I should start at the beginning...
I have a grid, #list1, that I wish to edit using the Form Editing functions on a selected row.
I think I can set the property "topinfo" of the modal edit form using the beforeShowForm event. I can't find any documentation *how* to set the topinfo property on the Edit Grid.
beforeShowForm:function setTitle(formID) {
alert(”beforeShowData”);
formID.editGridRow(”rowID”,{topinfo:”foo”});
},
Isn't working, so I'd really like to see an example of a working function that sets the topinfo of a modal edit (or add!) gridform. I'd don't know if 1) this is the right way to address the new edit form grid, 2) If editgridrow is the right methid to change the property "topinfo"
Thanks
Martin
09:55

Moderators
30/10/2007

Hello,
You call editGridRow twice which IMHO is not good.
In order to change the edit caption dynamically do this:
beforeShowForm : function (formid) {
var mytitle = "My text to show"; // or what you want
$(".ui-jqdialog-title","#edithd"+mygridid).html(mytytle);
}
wher mygrid id is the id of the grid.
Best Regards
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.
Most Users Ever Online: 715
Currently Online:
47 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66