Telerik Forums
Kendo UI for jQuery Forum
12 answers
2.9K+ views

My dropdownlist seems to have a lot of padding inside. When the optional value is displayed, it corresponds to the proper width from the CSS, However, when a value is selected, it expands itself to a lot more than the actual content length.  Please see attached document

 

Also, how do i have a fixed width of the dropdown when it is not selected, but when the user clicks to open the list, the dropped list is expanded

 

 

Man
Top achievements
Rank 1
 answered on 29 Oct 2015
1 answer
82 views

HI Telerik Team,

 I am trying to populate grid using datasource. but the grid is not populating

 

asmx

 [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public string GetTasks1()
        {
            JavaScriptSerializer theSerializer = new JavaScriptSerializer();
               string result = "";
                List<rt_aw_user_task_details> resultList = new List<rt_aw_user_task_details>();

                AW_USER_TASK_DETAILS taskDetails = new AW_USER_TASK_DETAILS();             
                taskDetails.Query.Load();

                resultList = taskDetails.ToRemotableList();            

                var data = resultList.Select(i => new { i.seq_no, i.task_id, i.category }).ToList();
                result =  new JavaScriptSerializer().Serialize(data);
                return result;           
        }​

aspx page

  $(document).ready(function () {​

            var tasksDataSource = new kendo.data.DataSource({
                type: "json",
                serverFiltering: true, serverPaging: true,  serverSorting: true,  pageSize: 10,
                transport: {
                    read: {
                        datatype: "json",
                        type: "POST",
                        url: "Service/MyTasks.asmx/GetTasks"
                    }
                }
            });

            tasksDataSource.read();

            $("#grid").kendoGrid({
                dataSource: tasksDataSource,
                height: 400,
                groupable: true,
                sortable: true,
                pageable: {
                    refresh: true,
                    pageSizes: true,
                    buttonCount: 5
                },
                columns: [{
                    field: "seq_no",
                    title: "CATEGORY"
                }, {
                    field: "task_id",
                    title: "FREQUENCY"
                }, {
                    field: "category",
                    title: "ISANYTIME",
                }]
            }); 

      });

 The grid is not loading.......

Is there anything i am missing??

 

and the service returns the following data

[{ "seq_no": 2, "task_id": 96, "category": "Task" }, { "seq_no": 3, "task_id": 92, "category": "Report To Review" },
                { "seq_no": 4, "task_id": 99, "category": "Meeting" }, { "seq_no": 5, "task_id": 96, "category": "Task" },
                { "seq_no": 6, "task_id": 96, "category": "Task" }, { "seq_no": 7, "task_id": 93, "category": "Report To Send" },
                { "seq_no": 8, "task_id": 99, "category": "Meeting" }, { "seq_no": 9, "task_id": 96, "category": "Task" },
                { "seq_no": 10, "task_id": 96, "category": "Task" }, { "seq_no": 11, "task_id": 99, "category": "Meeting" }]

 

But it is working when I give the data directly

 var tasksDataSource = new kendo.data.DataSource({
                data: [
                { "seq_no": 2, "task_id": 96, "category": "Task" }, { "seq_no": 3, "task_id": 92, "category": "Report To Review" },
                { "seq_no": 4, "task_id": 99, "category": "Meeting" }, { "seq_no": 5, "task_id": 96, "category": "Task" },
                { "seq_no": 6, "task_id": 96, "category": "Task" }, { "seq_no": 7, "task_id": 93, "category": "Report To Send" },
                { "seq_no": 8, "task_id": 99, "category": "Meeting" }, { "seq_no": 9, "task_id": 96, "category": "Task" },
                { "seq_no": 10, "task_id": 96, "category": "Task" }, { "seq_no": 11, "task_id": 99, "category": "Meeting" }]
            });

            tasksDataSource.read();​

Viktor Tachev
Telerik team
 answered on 29 Oct 2015
1 answer
86 views

HI Telerik Team,

 I am trying to populate grid using datasource. but the grid is not populating

 

asmx
 
 [WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public string GetTasks1()
        {
            JavaScriptSerializer theSerializer = new JavaScriptSerializer();
               string result = "";
                List<rt_aw_user_task_details> resultList = new List<rt_aw_user_task_details>();
 
                AW_USER_TASK_DETAILS taskDetails = new AW_USER_TASK_DETAILS();            
                taskDetails.Query.Load();
 
                resultList = taskDetails.ToRemotableList();           
 
                var data = resultList.Select(i => new { i.seq_no, i.task_id, i.category }).ToList();
                result =  new JavaScriptSerializer().Serialize(data);
                return result;          
        }​
 
aspx page
 
  $(document).ready(function () {​
 
            var tasksDataSource = new kendo.data.DataSource({
                type: "json",
                serverFiltering: true, serverPaging: true,  serverSorting: true,  pageSize: 10,
                transport: {
                    read: {
                        datatype: "json",
                        type: "POST",
                        url: "Service/MyTasks.asmx/GetTasks"
                    }
                }
            });
 
            tasksDataSource.read();
 
            $("#grid").kendoGrid({
                dataSource: tasksDataSource,
                height: 400,
                groupable: true,
                sortable: true,
                pageable: {
                    refresh: true,
                    pageSizes: true,
                    buttonCount: 5
                },
                columns: [{
                    field: "seq_no",
                    title: "CATEGORY"
                }, {
                    field: "task_id",
                    title: "FREQUENCY"
                }, {
                    field: "category",
                    title: "ISANYTIME",
                }]
            });
 
      });

 The grid is not loading.......

Is there anything i am missing??

 

and the service returns the following data

[{ "seq_no": 2, "task_id": 96, "category": "Task" }, { "seq_no": 3, "task_id": 92, "category": "Report To Review" },
                { "seq_no": 4, "task_id": 99, "category": "Meeting" }, { "seq_no": 5, "task_id": 96, "category": "Task" },
                { "seq_no": 6, "task_id": 96, "category": "Task" }, { "seq_no": 7, "task_id": 93, "category": "Report To Send" },
                { "seq_no": 8, "task_id": 99, "category": "Meeting" }, { "seq_no": 9, "task_id": 96, "category": "Task" },
                { "seq_no": 10, "task_id": 96, "category": "Task" }, { "seq_no": 11, "task_id": 99, "category": "Meeting" }]

 

But it is working when I give the data directly

 

var tasksDataSource = new kendo.data.DataSource({
                data: [
                { "seq_no": 2, "task_id": 96, "category": "Task" }, { "seq_no": 3, "task_id": 92, "category": "Report To Review" },
                { "seq_no": 4, "task_id": 99, "category": "Meeting" }, { "seq_no": 5, "task_id": 96, "category": "Task" },
                { "seq_no": 6, "task_id": 96, "category": "Task" }, { "seq_no": 7, "task_id": 93, "category": "Report To Send" },
                { "seq_no": 8, "task_id": 99, "category": "Meeting" }, { "seq_no": 9, "task_id": 96, "category": "Task" },
                { "seq_no": 10, "task_id": 96, "category": "Task" }, { "seq_no": 11, "task_id": 99, "category": "Meeting" }]
            });
 
            tasksDataSource.read();​

Viktor Tachev
Telerik team
 answered on 29 Oct 2015
1 answer
163 views

Hello!

We are using the angular hotkeys (http://chieffancypants.github.io/angular-hotkeys/) for keyboard shortcuts in our application. Currently it seems like the keyboard events aren´t triggered when the kendo editor is focused. Is this due to that the editor resides in an iframe?

Are there any workarounds for this problem? The keyboard shortcut that we are trying to catch is ctrl+alt+s.

 

Kiril Nikolov
Telerik team
 answered on 29 Oct 2015
3 answers
197 views
I'm using angular and ui-router with the extras so that I can use sticky state for maintaining listview scroll position on returning from the detail page in my mobile spa app.

My list is a kendo mobile listview. I'm implementing crud and would like to reflect the changes made in the listview when returning.
I wired up the onReactivate callback available in the ui-router sticky states and inject the service that has the flag to tell it whether crud operations have been done and to reload the list. This all works and I can successfully determine if I need to reload the screen.

So, I try to use the kendo.mobile.ui.ListView refresh method. I use angular.element("#idoflistview").data("kendoMobileListView").refresh(). It does find it and does refresh it, but all of the items are set to have a style="transform: translate3d(0px, 0px, 0px);", so they are all overlapping each other.

I have tracked it down to the fact that it only happens when I have loadMore true on the listview. If I turn this off, then it works fine.
So, in the code example below, if I set k-load-more="false" it works. I tried it with endless-scroll too and both have the same effect. 

Here is the abstract view:

    <div ui-view="activityinquirylist"  ng-show="$state.includes('activityinquiry.list')"></div>
    <div ui-view="activityinquirydetails" ng-show="$state.includes('activityinquiry.details')"></div>
    <div ui-view="activityinquirycrud" ng-show="$state.includes('activityinquiry.crud')"></div>

Here is how I'm declaring my listview:

    <div id="activityListScroller" kendo-mobile-scroller="activityListScroller" k-pull-to-refresh="true" k-pull="vm.pullToRefresh" k-pull-offset="200" class="scroller-header-footer">
        <ul id="activityListView" kendo-mobile-list-view="activityListView" k-data-source="vm.activityInquiryService.activityInqiuryDataSource" k-template="vm.activityTemplate" k-on-click="vm.listClicked(kendoEvent)" k-auto-bind="false" k-load-more="true"></ul>
    </div>

The css for the scroller:
   .scroller-header-footer {
   /*      position: fixed !important; */
       position:absolute;
       top: 55px;
       right: 0;
       bottom: 55px;
       left: 0;
   }
   
Here is the code for the state:

   .state('activityinquiry', {
       //sticky: true,
       abstract: true,
       url: '/activityinquiry',
       templateUrl: 'app/views/cm/activityinquiry.html'
   })
   .state('activityinquiry.list', {
       url: '/activityinquirylist',
       views: {
           'activityinquirylist@activityinquiry': angularAMD.route({
               templateUrl: 'app/views/cm/activityinquirylist.html',
               controller: 'activityinquirylistController',
               controllerUrl: 'controllers/cm/activityinquirylistController',
               controllerAs: "vm"
           })
       },

       sticky: true,
       deepStateRedirect: false,
       onReactivate: function ($rootScope, activityInquiryService) {
           console.log("reactivating");
           if (activityInquiryService.model.reloadList && activityInquiryService.model.reloadList == true) {
               activityInquiryService.model.reloadList = false;
              // $rootScope.$broadcast("reloadList");
               var item = angular.element("#activityListView").data("kendoMobileListView");
               if (item) {
                     item.refresh();
               }
           }
       }
   })
Petyo
Telerik team
 answered on 29 Oct 2015
2 answers
119 views

In every browser  $("#Grid").data("kendoGrid").setDataSource(dataSource); triggers a change and reads when autoBind is set to true.

However, in IE - autoBind only ever seems to fire once. I can call .setDataSource but in IE it never triggers the read(). 

 Anyone know of a work around?

Rosen
Telerik team
 answered on 29 Oct 2015
1 answer
146 views

Hello,

I'm trying to implement Kendo drag and drop functionality on Angulars ng-repeat. In my case i have two drop targets, in which one drop target has draggable elements on load, and the other doesn't. We can drag the elements from first drop target to the second, and these elements will be draggable in it. But when i drag these elements from the second drop target back to the first, the hint gets stuck in the second drop target. Any help will be appreciated.

 Dojo: http://dojo.telerik.com/evADi

 Thanks

Petyo
Telerik team
 answered on 29 Oct 2015
4 answers
1.7K+ views

I have an onChange function for my Kendo UI grid that reads as follows:

function onChange(arg) {

   var selectedRow = this.select();

   //Do something with selectedRow//

}

This function works perfectly when I run my code as a regular html page.  However, when I copy my script and place in a "Script Editor" web part on SharePoint 2013, I receive an error stating that "this" is undefined or null.  Any help on this issue would be truly appreciated.  Thank You.

 

Radoslav
Telerik team
 answered on 29 Oct 2015
3 answers
102 views

Hi, 

I'd like to get dates range for each view (mine are: timeline, week, month). How can I accomplish that?

 

Thank you

Philippe
Top achievements
Rank 1
 answered on 28 Oct 2015
3 answers
199 views
Is it possible to use data from my data source to initially set the title of a chart?  I am using JSON and when my data is returned I want to take a field i.e. Title and use the value to initialize my chart title.
EZ
Top achievements
Rank 2
 answered on 28 Oct 2015
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?