Hi Tony,
.
Seems even more difficult than we had imaged because the search dialog seems to be a modal and only in DOM when visible.
.
I wonder if it’s possible to add an additional event to the search button so when the search dialog is in DOM we could add elements and events?.
.
Looking at this from another view seems like our need for the the search dialog is mainly so we can add CRUD features. If we could figure out how extract the source code for the search dialog, maybe we could clone it in our own Save Search dialog where we would have the ability to add custom elements and events and save searches to the server?
.
Deploying jqGrid without Saved search functionality would be very difficult for us in our web application.
.
Can you think of any other way or hooks where we could add this functionality to jqGrid now?
.
Regards,
Tony
Hi Tony,
.
I’ve tried that but it seems to also have formatting issues.
.
For an empty line like in this post I’m using a blockquote with just a period (.) to make the paragraphs more readable.
.
Regards,
Tony
Hi Tony,
.
We’ve been trying to add CRUD features to the search dialog, seems like the search dialog doesn’t exist in DOM until the search icon has been clicked?
.
Seems like if we could load the search dialog in DOM without making it visible we could add elements and events like .change to the ui-template select, add additional buttons/links etc for CRUD.
.
Do you think there could be be a way to extend filters so they are in DOM when the grid is created?
.
Regards,
Tony
Hi Tony,
Please disregard where I said the filter was not working.
The save filter is now working, must have been something else in my code.
Our next steps are adding a button and/or icons to the search modal to call another modal with CRUD fields.
Thanks,
Tony
Hi Tony,
OK, Thanks for adding it to your todo list.
Wising it can make it in your next version 🙂
Regards,
Tony
Hi Tony,
<pre class=”lang:js decode:true ” > $(‘#jqGrid’).navGrid(“#jqGridPager”, {
…
multipleSearch: true,
multipleGroup: true,
showQuery: true,
// tmplNames: [“Template One”, “Template Two”],
// tmplFilters: [template1, template2],
tmplNames: tmplNames_array,
tmplFilters: tmplFilters_array,
recreateFilter: true,
…
});
var template1 =
{ “groupOp”: “AND”,
“rules”: [
{ “field”: “Account”, “op”: “eq”, “data”: “xyz” },
{ “field”: “Name”, “op”: “cn”, “data”: “Smith”}
]
};
var template2 =
{ “groupOp”: “AND”,
“rules”: [
{ “field”: “Name”, “op”: “eq”, “data”: “Carnes” },
{ “field”: “OrderID”, “op”: “le”, “data”: “10255”}
]
};
var tmplNames_array = [“Template One”, “Template Two”];
var tmplFilters_array = [template1, template2];
//test to add a filter
$(‘#savefilter’).click(function() {
var template3 = template1;
tmplNames_array.push(“Template Three”);
tmplFilters_array.push(template3);
return;
});
on server side in addition to the filter, we would need to know the template name and mode (create, read, update, delete)
Thank you, found the minified directory as you suggested.
Hi Tony,
Working now. THANKS.
Is there a min version of the bug fix on github I can download?
Thank you Tony.
As suggested, added bug Issue #3 “Event is raised only once when reloadOnExpand is true”.
When reloadOnExpand is true, your code works, when set to false a previous expanded subGrid does not collapse.
You can replicate the problem by clicking on Row1, Row2, Row 1.
What happends:
Clicking on Row 1 expands as expected.
Clicking on Row 2 collapes Row 1 and expands Row 2 as expected.
Clicking on Row 1 expands Row 1 as expected but does not collapse Row 2.
Thanks Tony,
Works until clicking on a previous expanded subGrid parent row.
Also added missing “}”
|
1 2 3 4 5 6 7 8 9 10 11 |
.... subGridBeforeExpand: function(divid, rowid) { // #grid is the id of the grid var expanded = jQuery("td.sgexpanded", "#grid")[0]; if(expanded) { setTimeout(function(){ $(expanded).trigger("click"); }, 100); } }, ... |
Thanks Tony.
Works until clicking on a previous expanded subGrid.
Also added missing “}”
|
1 2 3 4 5 6 7 8 9 10 11 |
... subGridBeforeExpand: function(divid, rowid) { var expanded = jQuery(<blockquote class="d4pbbc-quote"></blockquote>td.sgexpanded<blockquote class="d4pbbc-quote"></blockquote>, <blockquote class="d4pbbc-quote"></blockquote>#jqGrid<blockquote class="d4pbbc-quote"></blockquote>)[0]; if(expanded) { setTimeout(function(){ $(expanded).trigger(<blockquote class="d4pbbc-quote"></blockquote>click<blockquote class="d4pbbc-quote"></blockquote>); }, 100); } }, |
Add Row and Edit are both working after adding – reloadAfterSubmit: false;
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top