I'm trying to make a masked DatePicker using Kendo UI. Fortunately i have found an example how to achieve this:
http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/datepicker/how-to/masked-date-picker-grid
Unfortunately i can't change the mask from 00/00/0000 into this one:
$(element).kendoMaskedTextBox({ mask: that.options.dateOptions.mask || "rrrr-mm-dd" })
Because it breaks its functionality. Anyone got any ideas how can i change mask in this example ?
Along with the mask, the format needs to set as well when initializing the plugin
$('#datePicker').kendoMaskedDatePicker({
dateOptions: {
mask: '0000-00-00',
format: 'yyyy-MM-dd'
}
});
I've created an updated sample here for you to verify.
Related
I understand there are a few ways to format the numbers in the Angular Kendo UI Grid.
For example: {{decimal | kendoNumber:'c' }}
But instead of having a currency I would like to format the number in the following format (similar with the currency but without currency label):
123.123.123.123,11
(12 digits before the comma and two after the comma.)
In Kendo there are some NumberFormatOptions but I could not figure out how to use them. Can anyone provide me some examples of how to use these NumberFormatOptions correctly?
Would be great. Thanks in advance.
You can try a 'n2' format option, it works in the same way but without currency symbol
{{ 123123123123.11 | kendoNumber:'n2' }}
For the Kendo grid (e.g. to use currencies), the proper way to do this would be to import the language pack and provide it in your module:
import '#progress/kendo-angular-intl/locales/en/all';
{ provide: LOCALE_ID, useValue: 'en' }
Then in your kendo grid:
< kendo-grid-column field="Amount" title="Amount"
width="150" format="{0:c}">
I am using Select2 plugin in JQgrid to auto complete the Drop down box.I used this example to work through.
Using bootstrap select2 with JqGrid form
I created a fiddle with the above example.
http://jsfiddle.net/VTL4x/3/
The data for the select2 is fed from JSON but I am not able to replicate it in JSfiddle so I have commented out the and used hard coded values.
The Json string is
[{"value":"Windows","id":"134"},
{"value":"Win2008","id":"135"},
{"value":"Win2003","id":"136"},
{"value":"AIX","id":"150"},
{"value":"Linux","id":"151"},
{"value":"Unknown","id":"152"},
{"value":"i5OS","id":"153"},
{"value":"z/OS","id":"154"},
{"value":"Solaris","id":"155"},
{"value":"Sun Ultra 80 ","id":"156"},
{"value":"VAX","id":"157"}]
The problem is When I try to edit the record it does NOT show the values for the fields that have Select2 dropdown box. but when you expend I could see that correct values highlighted in blue.
I tried to debug the demo that was provided but that also had the same problem.
I am fairly new to front-end programming can you please help.
Thanks for your help
Which version of select2 you're using? I'm using v4 so your data should look like this:
var mySelectData = [{"text":"Windows","id":"134"},
{"text":"Win2008","id":"135"},
{"text":"Win2003","id":"136"},
{"text":"AIX","id":"150"},
{"text":"Linux","id":"151"},
{"text":"Unknown","id":"152"},
{"text":"i5OS","id":"153"},
{"text":"z/OS","id":"154"},
{"text":"Solaris","id":"155"},
{"text":"Sun Ultra 80 ","id":"156"},
{"text":"VAX","id":"157"}];
Use text instead of value.
The following fiddle is using jaydata and kendoui grid MVVM. The data loads nicely but filtering does not work. Why?
Will kendoui and jaydata combination be able to use the kendoui grid grouping functionality any time soon?
http://jsfiddle.net/t316/4n62B/9/
<div id="airportGrid" data-kendo-role="grid" data-kendo-sortable="true" data-kendo-pageable="true" data-kendo-page-size="25" data-kendo-editable="true" data-kendo-filterable="true" data-kendo-columns='["id", "Abbrev", "Name"]' data-kendo-bind="source: airports"></div>
kendo.ns = "kendo-";
$data.service("https://open.jaystack.net/c72e6c4b-27ba-49bb-9321-e167ed03d00b/6494690e-1d5f-418d-adca-0ac515b7b742/api/mydatabase/", function (factory, type) {
var airportDB = factory();
var vm = {airports:airportDB.Airport.asKendoDataSource()};
kendo.bind($('#airportGrid'),vm);
});
Filtering should work, please provide more info. First of all, you should either use initService or use onReady().
Also, please check the network traffic and paste the relevant part here.
If you see our examples with kendo then you can see filtering in action.
http://jaydata.org/examples/?tags=KendoUI
In Jqgrid for some columns I have set as link.
And also for those columns I have set footer (MAX).
But the issue is, configured link is also getting added to the footer value, which is not expected.
Any help is appreciated.
Thanks in advance.
I think the problem is how you add the footer information. If you use footerData you can use false as the last parameter (the format parameter) of footerData. In the case the footer data will not be formatted by the standard formatter of the corresponding column. As the example see the demo.
If you add the data from the server using userdata and use userDataOnFooter jqGrid option the formatter parameter will be alway used as true (see the source code of jqGrid here and here). As a workaround you can remove userDataOnFooter:true setting and add the footer information manually with respect of footerData inside your localComplete event handle:
var myGrid = $("#list"); // your grid
// ...
// inside of localComplete you can add the data
var userData = myGrid.jqGrid("getGridParam","userData");
myGrid.jqGrid("footerData","set",userData,false);
For a couple of days now I have been playing around with the jqgrid.I have been trying to accomplish what is found on this example http://www.the-di-lab.com/demo/apples that is placing a date picker on the modal form.
So far I have tried to follow what I found on this link but I get a target.getAttribute is not a function error in my ui.datepicker.js script.
Anyone who has done it succesfully?
Don't know if you or someone else is still seeking for an answer.
I just realized this by using the editoptions in column definition, like so:
... ,editoptions:{dataInit:datepicker}
where datepicker is a function like
function datepicker (elem) {
jQuery(elem).datepicker(
// {} // options here
);
};