Kendo grid grouping message does not change - grid

Hello and thanks in advance for any suggestions.
I am using the grouping option in the Kendo UI and i wanted to change the default grouping message :Drag a column header and drop it here to ...
So i changed the text in 3 .js files called: kendo.all.min.js, kendo.web.min.js, and kendo.groupable.min.js, to the desired text and the text does not change.
I think i'm missing something because when i group and un-group i see my message for a sec but then the grid reloads again and i get the original message again. Is the message coming from the dll or just from java script? hope someone can help it is really important.
Thanks.

If you did it correctly and are loading the modified version of the JS it should work BUT that is not the way for localizing the message... KendoUI (in the latest versions) already has support for it. You should have done:
groupable: {
messages: {
empty: "Custom message text"
}
},
as it is shown in their documentation here
Remember that if you modify their code, next time they release a new version you will have to merge their version with yours for having the fixes and new features that KendoUI team developed plus your changes.
EDIT If you want to have it for every Grid in you document, put at the very beginning of the JavaScript code:
kendo.ui.Groupable.prototype.options.messages =
$.extend(kendo.ui.Groupable.prototype.options.messages,
{empty: "Custom message text!"}
);

Related

Issue in ParamQuery Grid Inline Edit

We are using ParamQuery grid in our project.
In one of our screen, we are using the grid in modal popup with inline edit feature.
We are facing issue on editing the cell from second time. Here are the steps followed,
Open the popup, first time, tried to edit a record – it is perfectly changed and updated.
Now close and re-open the modal popup.
Try to change the data and update - It is not updating any data. Changed data gets vanished by retaining the previous value.
On debugging the code,
a. We are getting false in the following code snippet while updating the data,
if (grid.saveEditCell() == false) {
return false;
}
b. We are also getting the script error,
pqgrid.min.js:188 Uncaught TypeError: Cannot read property 'split' of undefined(…)
As of now, we are using the workaround,
“After updating the data 1st time, we are re-loading (using window.location.reload()) the page. Now it is working correctly. But in Ajax world, we don’t want to reload the full page, just to solve this issue. We believe, that this is because of some small issue or configuration missing.”
Referred the following article and implemented the inline edit functionality http://paramquery.com/pro/demos/editing
Appreciate your help.

jQuery component stop working when routing

I'm using Bootstrap Select in Meteor (using this package if relevant: https://github.com/amrali/bootstrap-select-meteor), but everytime I switch page and go back (IronRouter) the select has reverted to a standard HTML select.
I initialize it in the rendered callback but it's only called once and breaks when navigating:
Template.temp.rendered = function() {
$('.selectpicker').selectpicker();
};
How can I make sure it's always inited when the template is shown?
I can think of a few hackish ways of solving it but I'm sure there's a better way..
I've seen a similar issue, it makes me think that when you are "changing pages" you are not actually "destroying" the template temp, as the selectpicker() doesn't get called again when you "change back". You don't show enough information to answer this accurately, but you can try
Destroying the selectpicker() during temp.onDestroyed
Initializing selectpicker() in every template you need it for

Devexpress Xtrareports databound generates (unwanted) pagebreak after each record

Using devexpress xtrareports version 11.2 I have setup a databound report using a temporary table. I bind the content to a single xrrichttext on the report.
Each record is generated and each next record starts on a new page. Now I want to lose the automatic pagebreak and implement my own logic for breaking.
But I have not yet been able to drop the auto-break. I went through all the pagebreak properties in design mode but everything is already set to none.
Besides the xrrichtext there is also a xrpanel which contains a xrlabel, all are set to a low height as default with cangrow/canshrink to true.
Is there something specific I can set for this or am I still missing something?
edit:
I am using the detailband, I had given the xrrichtext a minimal height after realizing this might be the problem, but this didnot seem to help. But after I restarted this did however fix the problem.
But now my own pagebreaks are not working as expected, not sure if I should start another question for this.
In the detailband I have added a xrpagebreak.
In the detail_beforeprint I check if the current records needs a pagebreak
If GetCurrentColumnValue("break") = True Then
xrPageBreak1.Visible = True
Else
xrPageBreak1.Visible = False
End If
Only now I am getting a pagebreak for every record, doesnot seem to react on the value for field 'break'?
which reportband are you using?
some report bands only appear once on every page, usually data is added to the detail band, this is displayed until the page is full. or until you break the page yourself

Adding Refresh Tag to View

I need a view to refresh automatically every 20 seconds, and have added the following code to the view header via the views GUI - with no success. The code (or portions of it) are simply displayed on the view and no updating is performed. I've tried omitting both and just the ending ?php statement. If someone can tell me the proper code to use, or a better approach at updating the view automatically, I'd be very appreciative. Thanks.
print "<meta http-equiv=\"refresh\" content = \"20\" />;
There are a few modules that can take care of this for you via AJAX without refreshing the page.
This should take care of everything for you: http://drupal.org/project/ajax_views_refresh
Be sure to get the main AJAX module as the base.
A more complex one, if you want to code a bit: http://drupal.org/project/live_update
If you want to just refresh nodes and the view is on them you can do the old school refresh with this... http://drupal.org/project/refresh
Your code isn't coming through, but if it's php code make sure that the input format for the view header is set to "PHP Code"
Read the fine print under the text area. Sometimes PHP Code format doesn't require <?php tags. Some modules implement this differently.
Use drupal_set_html_head
For example:
drupal_set_html_head('<meta http-equiv="refresh" content = "20" />');

RadioButtons, ListViews, and Grouping, oh my!

I've got a project I'm working on where I need to put a RadioButton inside a ListView, and have them all have the same GroupName. (can't use RadioButtonList, long story).
Anyway, this seems to be a well known bug in .NET, so I've implemented the solution found here:
ASP.NET RadioButton messing with the name (groupname)
This works perfectly, but with one small bug which undoubtedly will come back to bite me. If I click one radio button, and then click another while the javascript function is still running and has not completed; I can get 2 radiobuttons in the same group selected.
Any ideas? If you need clarification; leave me a comment and I'll update my post.
EDIT: I believe I fixed my own issue here. See my posted answer below.
Would something like this work?
if (!rbClicked)
rbClicked=True;
runJavascript();
rbClicked=False;
I admit I didn't do alot of research, but this is how I've usually solved this type of problem.
Turns out I was misguided here.
Later on in the page lifecycle; I was adding an additional onclick event that was overwriting the previous value.
In the following example:
var radiobutton = new System.Web.UI.WebControls.RadioButton();
radiobutton.Attributes.Add("onclick", "test1");
radiobutton.Attributes.Add("onclick", "test2");
the onlcick attribute is set to "test2"; test1 is lost.
I ended up fixing it by appending to the existing attribute; see below:
radiobutton.Attributes["onclick"] = string.Format("{0};{1}", radiobutton.Attributes["onclick"], "My Second Script");
This works without issue.

Resources