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
search recreateform:true nit working
05/06/2013
20:14
Avatar
dukechandu
Hyderabad
Member
Members
Forum Posts: 7
Member Since:
05/06/2013
sp_UserOfflineSmall Offline

Hi,

could any one please help me reagarding search issue.

i am changing colnames dynamically, for example: i am having a column with 'Description' depending on data i am changing this column name to 'name', i am able to chage and these changes are reflecting in add and edit screen by using recreateForm:true, but when comes to search, dynamic column names are not changing, can any one help me this issue.

Thanks & Regards

chandra

07/06/2013
06:55
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

There is not documented option in Navigator search options.

Try to set recreateFilter to true – i.e

jQuery("#navgrid").jqGrid('navGrid','#pagernav',

{},//options

{},// edit options

{}, // add options

{}, // del options

{recreateFilter :  true} // search options );

or set it in searchGrid method.

Regards

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.

07/06/2013
19:56
Avatar
dukechandu
Hyderabad
Member
Members
Forum Posts: 7
Member Since:
05/06/2013
sp_UserOfflineSmall Offline

Hi,

Thanks for the reply, i tried but it is not working, as i understood recreate filter means only filter will rest not the form options dropdown. i tried with recreateform:true and also {recreateform:true,recreateFilter :  true} // search options ); but the issue is not resolved.

jQuery("#navgrid").jqGrid('navGrid','#pagernav',

{},//options

{recreateform:true},// edit options

{recreateform:true}, // add options

{}, // del options

{recreateFilter :  true,recreateform:true}

for add and edit options the above code is working fine but for search it is not working. ie, when i am changing or renaming the column names on some conditions in add and edit it is reflecting with grid reload and recareteform:true, but for search it is not working.

07/06/2013
20:58
Avatar
dukechandu
Hyderabad
Member
Members
Forum Posts: 7
Member Since:
05/06/2013
sp_UserOfflineSmall Offline

Image Enlarger<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <link rel="stylesheet" type="text/css" media="screen" href="themes/jquery-ui-custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="themes/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="themes/ui.multiselect.css" />
<style>

html, body {
    margin: 0;            /* Remove body margin/padding */
    padding: 0;
    overflow: hidden;    /* Remove scroll bars on browser window */    
    font-size: 75%;
}
</style>
 </HEAD>

 <BODY>
 

  <table id="list4"></table>

<table id="childGrid"></table>
<div id="childPager"> </div>
 </BODY>
<script src="js/jquery-1.9.0.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-custom.min.js" type="text/javascript"></script>
<script src="js/jquery.layout.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script type="text/javascript">
    $.jgrid.no_legacy_api = true;
    $.jgrid.useJSON = true;
</script>
<script src="js/ui.multiselect.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.js" type="text/javascript"></script>
<script src="js/jquery.tablednd.js" type="text/javascript"></script>
<script src="js/jquery.contextmenu.js" type="text/javascript"></script>
<script>

jQuery(document).ready(function(){

});

jQuery("#list4").jqGrid({
datatype: "local", height: 100,
colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[ {name:'id',index:'id', width:60, sorttype:"int"},
{name:'invdate',index:'invdate', width:90, sorttype:"date"},
{name:'name',index:'name', width:100},
{name:'amount',index:'amount', width:80, align:"right",sorttype:"float"},
{name:'tax',index:'tax', width:80, align:"right",sorttype:"float"},
{name:'total',index:'total', width:80,align:"right",sorttype:"float"},
{name:'note',index:'note', width:150, sortable:false} ],
onSelectRow: function(row_id) {
alert(row_id);
    if(row_id==1) {
     jQuery("#childGrid").jqGrid('setLabel', 'company', 'Working Area');
     jQuery("#childGrid").jqGrid().trigger('reloadGrid');
    } else {
    jQuery("#childGrid").jqGrid('setLabel', 'company', 'Some header');
     jQuery("#childGrid").jqGrid().trigger('reloadGrid');
    }
},
 caption: "Manipulating Array Data" });

var mydata = [ {id:"1",invdate:"2007-10-01",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"}, {id:"2",invdate:"2007-10-02",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"}
 ];

for(var i=0;i<=mydata.length;i++) jQuery("#list4").jqGrid('addRowData',i+1,mydata[i]);

var childData = [
{name:"test",company:"company 1",Age:"10"},
{name:"test2",company:"company 2",Age:"20"}
 ];

jQuery("#childGrid").jqGrid({
datatype: "local",
data:childData,height: 100,
colNames:['name','Company', 'Age'],
colModel:[
{name:'name',index:'name', width:160, sorttype:"int",editable:true},
{name:'company',index:'company', width:190,editable:true},
{name:'Age',index:'Age', width:200,editable:true}
 ],rowNum:20, rowList:[10,20,30], pager: '#childPager', sortname: 'id', viewrecords: true, sortorder: "desc",
 caption: "Manipulating Array Data" });

jQuery("#childGrid").jqGrid('navGrid',"#childPager",{edit:true,add:true,del:false,search:true},
{recreateForm:true},
{recreateForm:true},
{},
{recreateForm:true,recreateFilter:true});
</script>
[Image Can Not Be Found]
</HTML>

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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