Telerik Forums
Kendo UI for jQuery Forum
2 answers
389 views
I am looking to apply my saved grid column width(s) back to the grid. 
I have been able to retrieve them successfully, but have not yet been able to restore them.
Would i apply these using a dataBound event? Haven't had any success. I would appreciate some guidance.

  columnResize: function (e) {
                            var grid = this;
                            var state = {};
                            grid.columns.every(function(c, i) {
                                state[c.field] = c.width;
                                return true;
                            });
                              //Save to browser localStorage
                            localStorage.setItem('gridColumnWidth', JSON.stringify(state));
                        },

Michael
Top achievements
Rank 1
 answered on 25 Jun 2014
3 answers
550 views
When creating a numeric text box with the option enable: false, the numeric text box is not disabled.
This should work according to the documentation example:

<script>
$("#numerictextbox").kendoNumericTextBox({
enable: false
});

var numerictextbox = $("#numerictextbox").data("kendoNumericTextBox");
numerictextbox.enable(true);
</script>

http://plnkr.co/edit/tfsrw5ajeQh1nzTBFolr

Does anybody have an idea what the issue could be?
Georgi Krustev
Telerik team
 answered on 25 Jun 2014
8 answers
319 views
Is there a built-in way to do an action sheet where the elements come from a data source?

I saw http://www.kendoui.com/forums/mobile/action-sheet/dynamic-action-sheet.aspx where another David asked about dynamic action sheets and using the technique you gave there, I was able to kinda accomplish it indirectly:

function LoadActionSheet()
{
        var strHtml = '<li class="km-actionsheet-title">Select Action</li>\r\n';

        jQuery.each(arrValidRoutes, function (i, val) {
            strHtml += '<li><a href="#" data-actionsheet-context="' + val.id + '" data-action="PerformAction">' + val.name + '</a></li>\r\n';
        });

        $("#MyActionSheet").data("kendoMobileActionSheet").destroy();
        $("#MyActionSheet").html(strHtml);
        kendo.init($("#MyActionSheet"), kendo.mobile.ui);    
}

My ActionSheet displays just fine using this code.

The problem I'm having is with finding out the ID of the item selected in my click handler - PerformAction.  I tried e.context, but I'm guessing that this is for the data-actionsheet-context of the calling link, not for the data-actionsheet-context of the selected action.

So (A) is there any way that I can pass the ID of my selected action to my event handler or (B) is there a built-in way to have a data-driven action sheet?
Maxim
Top achievements
Rank 2
 answered on 25 Jun 2014
1 answer
141 views
Hi,

When I declare the input for a DropDownList using inline style the width is set accordingly:

<input id="Service" name="Service" style="width:900px"/>

When I use an external style sheet it does not:

#Service
{
    width: 600px;
}

Is there any way of using an external style sheet with Kendo UI? Please note that I do not want to use javascript to set the width.

Thanks.
Dimo
Telerik team
 answered on 25 Jun 2014
9 answers
151 views
Hello,

When using Firefox, dropdownlists in grid don't always show when selected, if navigatable is true.
IE10/11/Chrome seems fine.

https://www.youtube.com/watch?v=S1Kun1s6rGY

Tried to recreate behavior in test code.
It shows up more with more data in the grid, thou this example is way more then is needed for it to appear in our app.
http://trykendoui.telerik.com/eQUP/9












REQSKendoUI!






Reqs
Top achievements
Rank 1
 answered on 25 Jun 2014
4 answers
635 views
I know this problem has been addressed in several threads but all the solutions are not working for me:
This is my simple code:
01.  $(function () {
02.        var window = $("#popup").kendoWindow({
03.          animation: {
04.              open: {
05.                  effects: { fadeIn: {} },
06.                  duration: 200,
07.                  show: true
08.              },
09.              close: {
10.                  effects: { fadeOut: {} },
11.                  duration: 600,
12.                  hide: true
13.              }
14.          },
15.          visible: false,
16.          title: "Create ...",
17.          modal: true,
18.          close: function () {},
19.           
20.      }).data("kendoWindow");
21.       
22.      window.bind("refresh", function() {
23.          window.center();
24.          window.open();
25.      });
26.  });
27.  function createNewNotam() {
28. 
29.      var model = @Html.Raw(Json.Encode(subjectModel))
30. 
31.      $("#NSDEditor-Popup").data("kendoWindow")
32.          .content("")
33.          .refresh({
34.              url: "../Dashboard/Create",
35.              type: "POST",
36.              data: model
37.          });
38.}

The window still show in the center, then load content and become off the screen to the bottom.

What I am doing wrong here?

Thanks.





Dimo
Telerik team
 answered on 25 Jun 2014
3 answers
643 views

What is the correct way to import Kendo when using TypeScript and RequireJS? 

I have added the kendo.web.d.ts file to my typings folder in my project and then I tried to import kendo with the following code:

import kendo = require("kendo");

However, this I get the following error:

error TS2071: Build: Unable to resolve external module '"kendo"'.

I am able to import jQuery with the following code:

import $ = require("jquery");

And it does not have an issue.  So I'm wondering what is needed to import Kendo.

Also, I found this post: http://www.telerik.com/forums/typescript-requirejs, where it mentions adding the "amd-dependency path", but that seems like extra work.  I don't want to have to add that comment to each TypeScript file that uses Kendo.  It seems like I should be able to use the import statement, like I can with other libraries (such as jQuery).

I have not found any documentation on this topic on the Kendo site, so any help would be greatly appreciated.

Thanks,
Sean

Mihai
Telerik team
 answered on 25 Jun 2014
1 answer
486 views
I've been trying to do some validation with my DatePicker through JS but I noticed one major issue.  Whenever I add javascript it overrides the settings in my htmlattributes setup.  The following is the wrapper I am using for my DatePicker:

 @(Html.Kendo().DatePicker()
            .Name("startDates")
            .Max(DateTime.Now)
            .Format("MM/dd/yyyy")
            .HtmlAttributes(new { style="width: 200px;" , required="true"})
            )


Below is the JavaScript I am using for some validation:

​<script type="text/javascript">
    $(document).ready(function () {
        function startChange() {
            var startDate = start.value(),
                        endDate = end.value();

            if (startDate) {
                startDate = new Date(startDate);
                startDate.setDate(startDate.getDate());
                end.min(startDate);
            } else if (endDate) {
                start.max(new Date(endDate));
            } else {
                endDate = new Date();
                start.max(endDate);
                end.min(endDate);
            }
        }

        function endChange() {
            var endDate = end.value(),
                        startDate = start.value();

            if (endDate) {
                endDate = new Date(endDate);
                endDate.setDate(endDate.getDate());
                start.max(endDate);
            } else if (startDate) {
                end.min(new Date(startDate));
            } else {
                endDate = new Date();
                start.max(endDate);
                end.min(endDate);
            }
        }

        var start = $("#startDates").kendoDatePicker({
            change: startChange
        }).data("kendoDatePicker");

        var end = $("#endDates").kendoDatePicker({
            change: endChange
        }).data("kendoDatePicker");
        start.max(end.value());
        end.min(start.value());
    });


</script>


Anytime I use that script (which doesn't have any attributes that would change any css) the length of the datepicker changes from the ones set in the htmlattributes.  I've tried moving the script from the top of the page to the bottom and to no avail.
Dimo
Telerik team
 answered on 25 Jun 2014
4 answers
218 views
Hello 

There is any way that  Export grid UI data in PDF , MSword , html , text format  using  JS/HTML5 framework .  I don't want to use any other  language like Dot Net , PHP , JSP ...etc .. 
I want solution only in JS/HTML5 framework .

Thank you
    
Sebastian
Telerik team
 answered on 25 Jun 2014
1 answer
212 views
Hi,

I know that you can change the width of the combobox drop-down list programatically using the following method:

http://docs.telerik.com/kendo-ui/getting-started/web/combobox/overview#customizing-the-width-of-the-drop-down-list

If there some way to set the width of the drop down list to be automatic, so that the width changes to match the size of the content on a single line?

I am interested in templates that have one or more columns:

template: "<div><span>#: TicketTypeName #</span><span>#: TicketTypeDescription #</span></div>"
template: "<div><span>${TicketStatusName}</span></div>"
Kiril Nikolov
Telerik team
 answered on 25 Jun 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?