Forum


01:28

08/06/2010

I am using a FormEdit dialog box with the Navigation bar icons.
- I would like the set the editCaption and delCaption to display data based on the row selected.
- I am also using one grid to load data into another, I am passing data in editData array, but would like to set addCaption to display some of the data.
Is this possible? Everythiing I have tried never changes the caption.
Thanks
Ben
22:42

08/06/2010

rmvenancio said:
About the second question you can do this :
Add the onSelectRow on the first grid
onSelectRow: function (ids) {
jQuery("#Detail").setGridParam()
.setCaption("New Caption")
.trigger('reloadGrid');
}I'm trying to find a way to do the same you requested in point 1.
Yes, this works, I am currently do this, but that only works for the main grid Caption not the FormEdit Caption.
onSelectRow: function(rowid) {
if (rowid != tabSelectedRowid){
tabSelectedRowid = rowid;
jQuery("#tabsdetail").jqGrid('setGridParam',{
url:"profile_tabs_detail_data.php?id="+rowid,
page:1
});
jQuery("#tabsdetail").jqGrid('setCaption',"Tab Detail: "+ jQuery(this).getCell(rowid,'dash_tab'))
.trigger('reloadGrid');
}
}
00:54

10/08/2009

Hello BenRivera,
I would recommend you to use beforeShowForm and afterclickPgButtons event handler to change the title of the edit dialog, because editCaption not support functions as a value. I created a small demo for you.
Exactly in the way you can use beforeShowForm for delete parameters
var title = $("#delhd"+grid[0].id+ " .ui-jqdialog-title");
instead of
var title = $("#edithd"+grid[0].id+ " .ui-jqdialog-title");
to find the title of the dialog.
Best regards
Oleg
18:35

10/08/2009

Hello Ben,
I not quite understand which text you want to place in Add dialog? If you want a static text you can use addCaption parameter. If you know any rule to generate a title dynamically you can do all exactly like for the Edit dialog. You should just add parameters for the Add dialog as a navGrid parameter (see parameter prmAdd here).
Best regards
Oleg
04:45

08/06/2010

Thiis ithe why I am looking to add data to the addCaption heading:
Grid_1 = Parent table, add, edit delete is available.
Grid_2 = Child Table, has edit and delete icon, but no add. Adding is done using Grid_3
Grid_3 = Large List of values with descriptions and other data.
On double click of a row in Grid_3, I check that a row is selected in Grid_1 and call Grid_2.jqGrid('editGridRow', "new",...) to add a new row. I have tried setting the addCaption in this call to display the description of the data key being added, but it doesn't do anything.
Since the data keys description in Grid_2 is not editable, it does not diplay in the form. So I want to display it in the heading.
Thanks for working with me on this,
Ben
Most Users Ever Online: 715
Currently Online:
62 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