I referred the following pages Page1 and Page2 but couldn't understand the meaning/usage/purpose of prePostEnabled - with value false and true
Could someone please explain.
What is prePostEnabled is?
Thanks
Related
I've implemented the following within my keno grid:
jsfiddle.net/JBeQn/
What I would like to achieve is this; When the user drags a row, any rows beneath it will change style as the dragged row passes over it.
Does anyone have an example of how this can be achieved?
Thanks,
I hope I'm understanding you right but would this be of help to you?
http://demos.kendoui.com/web/grid/foreignkeycolumn.html
http://demos.kendoui.com/web/grid/column-reordering.html
reorderable: true,
resizable: true,
groupable: true,
Can anyone point me in the right direction?
I'm looking to use DataTables.net or jqGrid with an ASP MVC4 ApiController action for the source.
The problem I have is that i just return an array of objects..
e.g.
[{"Name":"Brian", "Age" : "35"}, {"Name":"Jim", "Age" : "45"}]
I don't format it like the samples i.e. with aaData or arrays of string.
Can anyone tell me how they overcome this problem?
I'll even settle for jqGrid if someone and point me in the direction of a good example.
tnx
Brian.
It' not a problem in jqGrid. You need just define jsonReader which describe how the data can be read by jqGrid. For example
See the demo:
It uses
jsonReader: {
repeatitems: false,
id: "Name",
root: function (obj) {
return obj;
}
}
and the JSON data which you posted.
To use different actions(Post, Put and Delete) of ASP.NET Web API for add edit delete operations, check following example:
http://techbrij.com/1017/add-edit-delete-jqgrid-asp-net-web-api
I have no idea why this doesn't work, but none of my custom button actions (tasks) do anything in my component. In my view.html.php file I have:
JToolBarHelper::custom('reports.export_csv', 'csv', '', 'CSV', false);
JToolBarHelper::custom('reports.export_mailchimp', 'mailchimp', '', 'Mailchimp', false);
Then in my ReportsControllerReports file I have 2 methods (not just 2, there are some others but they aren't relevant), export_csv() and export_mailchimp(). Whenever I click the buttons I get a JS error which I assume is preventing the action from executing the code in those methods. Something about "b is undefined". I cannot find any differences between my code and that used in other Joomla (core) components, so if anyone could shed some light on this issue it would be greatly appreciated (as usual, the Joomla forums are totally useless).
#Cfyzz solution works.
I added this to view file:
<script type="text/javascript">
Joomla.submitbutton = function(pressbutton) {
switch(pressbutton) {
case 'google':
window.location = '<?=JRoute::_( 'http://google.com', false );?>';
break;
case 'stackoverflow':
window.location = '<?=JRoute::_( 'http://stackoverflow.com', false );?>';
break;
}
}
</script>
and this in view.html.php
JToolBarHelper::cancel('stackoverflow', 'Go Overflow');
JToolBarHelper::custom('google', 'checkin', '', 'Go Google', false);
Obviously you dont have to use "JRoute::_(" in this situation. I replaced inner links with 2 samples so it`s easier to understand.
You should override the Joomla's JS framework behavour
You should use the function in your custom JS file:
Joomla.submitbutton = function(pressbutton) {
switch(pressbutton) {
case 'export_cvs':
URL = JURI::base.'index.php?option=yourController&task=export_cvs&....
$.ajax({
url: URL,
type: post, etc
});
}
}
In my component everytrhing is ok and working properly
I'm using Mootools Behavior - https://github.com/anutron/behavior. It works fine but behavior of elements that are ajax-loaded doesn't apply.
Here's my code:
var request = new Request.HTML({
url: get_url(),
append: $(api.get('append')),
evalScripts: true,
onSuccess: function(){
window.behavior.apply(document.body);
}
});
And it doesn't work.
(window.behavior is the main Behavior instance)
Thank in advance.
UPD. That was my own problem with static loading. The code above should work.
Maybe you should try to set the second, optional parameter on the Behavior.apply()-method.
Try window.behavior.apply(document.body, true) in your success-callback function. Elements which already have been processed will be processed again, if the second parameter "force" is set to true. That could be your problem, if not, check back and let us now please.
Instead of re-applying the behavior to the entire document, re-apply it to the new content only. I use this pattern frequently with success.
var target = $(api.get('append'));
var request = new Request.HTML({
url: get_url(),
append: target,
evalScripts: true,
onSuccess: function() {window.behavior.apply(target);}
});
HI,
I hope somebody can help me here with the extjs framework.
The problem I am having is that the field validation is not being rendered for the tabs that are not visibele on initialisation off the panel.
It only starts working when clicking in the textfields.
What I need is something to force the validation cue's for the fields on activating the tabs.
EDIT
I came up with this
Ext.getCmp('aanMakenGebruikerTabPanel').on('tabchange',function(){
AanMakenGebruikerWindow.syncShadow();
Ext.getCmp('Mobiel1Veld').on('render',function(v){v.validate();});
Ext.getCmp('Email1Veld').on('render',function(v){v.validate();});
//console.log("[aanMakenGebruikerTabPanel] resize -- sync");
});
EDIT
I SOLVED IT BY USING THE CASCADE FUNCTION SO IT ALSO REACHES ITEMS IN A FIELDSET.
Ext.getCmp('aanMakenGebruikerTabPanel').on('tabchange',function(tabPanel,tab){
AanMakenGebruikerWindow.syncShadow();
tab.cascade(function(item) {
if (item.isFormField) {
item.validate();
}
} );
});
thanks, Richard
The deferredRender option defaults to true. Will setting it to false help?
{
xtype: 'tabpanel',
deferredRender: false,
items: []
}
In your Tab Panel config object add listeners for the beforetabchange/tabchange event. In the handler you have to iterate through the fields contained in the activated tab and trigger each field's validation. Hope this helps.