Telerik Forums
Kendo UI for jQuery Forum
6 answers
1.1K+ views

I'm trying to create a drop down list with grouping where I custom sort the data by group in a non-alphabetical way.  I've created a sort function that I run on the data before I pass it to the Kendo DataSource and if I output the array to the console at that point the data is in the correct order.  Once I create the Kendo DropDownList though it seems to break the sort and puts back to alphabetical order.  I further tested things by turning grouping off on the drop down and in that case the drop down displays the data in the correct order as sorted by my sort function.  Any ideas?

 The data is an array of objects that look like:

{
  Value: "value",
  Group: "group"
}

The sort function is

 

newData.sort(function(a, b) {
  var av, bv;
 
  switch(a.Group.toLowerCase()) {
    case "group 1":
      av = 1;
      break;
    case "group 2":
      av=2;
      break;
    default:
      av=3;
      break;
  }
 
  switch(b.Group.toLowerCase()) {
    case "group 1":
      bv = 1;
      break;
    case "group 2":
      bv=2;
      break;
    default:
      bv=3;
      break;
  }
 
  return av-bv;
});

The function to build the drop down is

 

$.fn.sampleDD = function(options) {
  var ds = new kendo.data.DataSource({
    transport: {
      read: function(opts) {
        $.ajax({
          type: "GET",
          url: "<SharePoint REST Service URL>",
          dataType: "json",
          success: function(results) {
            //converts the data a bit to account for SharePoint's weird data returns
 
            //runs the sort function referenced above
 
            opts.success(sortedResults); //sortedResults is created from the conversion and sorting
          },
          error: function(results) {
            opts.error(results);
          }
        });
      }
    }
  });
 
  //listed separately because there's an if statement here that doesn't always group it
  ds.group({
    field: "Group"
  })
 
  return this.kendoDropDownList({
    dataTextField: "Value",
    dataValueField: "Value",
    dataSource: ds,
    optionLabel: "Make a selection",
  }).data("kendoDropDownList");
  });
};

 which is then called by

$("#dropDown").sampleDD();

Boyan Dimitrov
Telerik team
 answered on 13 Jan 2017
5 answers
1.2K+ views

Hi, Kendo newbie here,

I've been evaluating whether the Grid control or the spreadsheet control is best for my application requirements.  I'm leaning toward the Grid, but I'd like to get a second, third, nth opinion.

In general, I think the Spreadsheet is overkill, and I like the aesthetic of the Grid much more.  However, here are some features I need that I don't see in the Telerik demos.

I'd like my user to be able to easily duplicate one or more rows:

- Either by checking off the rows with shift-clicks, or in some other way highlight and select multiple rows.

- duplicate the selected rows with a button and/or keystroke

 

Thoughts?

Thanks in advance.

Duke
Top achievements
Rank 1
 answered on 12 Jan 2017
3 answers
717 views
Hi,

We are using Kendo grid and Bootstrap in our web application. We are trying to configure the grid for responsive behavior using bootstrap classes. When we apply the col-md-hidden class on a kendo grid column & its header the column is hidden but there is a white space on the right of the grid, and the white space keeps increasing as we hide more columns. The column widths does not get reset to expand when a column is hidden. BTW, we have not given any widths to the columns.

Sid
Dimo
Telerik team
 answered on 12 Jan 2017
2 answers
748 views

Hi,

I want the grid to fill the available space and have virtual scrolling so I'm using a flex layout with the grid set to 100% and it sits in a div with style:

  flex: 1 1 auto;

Its almost working except the horizontal scroll bar that appears at the bottom of the grid overflows the containing div and hence causes a scroll bar on the browser.  It looks like the border on the horizontal scroll bar is at least part of the problem.  If you look at the attached image from the bottom left of the window you can see that in the red rectangle that I've added it shows a grey bar which is not part of the enclosing div. Do you have an example with: virtual scrolling, a horizontal scrollbar, and the grid filling the available space using flex?

 

Thanks,

 

 

Scott Waye
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 12 Jan 2017
1 answer
688 views

Hi,

I am trying to implement a cascading dropdownlist (Country and State) in grid popup editor on my application. Please help me to resolve the below issues,

    - Unable to set default value for Dropdown (Country) when Add new entry

    - Java Script/ Jquery is not working in popup editor for cascading dropdown based on country selection.

    - Keep disable the  dropdown (State) if the value is empty.

 

Thanks,

Prabhakar.P

Dimiter Topalov
Telerik team
 answered on 12 Jan 2017
7 answers
189 views

We are currently re-assessing our usage of the Kendo Map in our web application. While our needs have been fairly basic until now, in the near future we will require more advanced features.

Reviewing the  Release notes it appears that aside from bug fixes, little has been done to the map control since Q2 2014 or Q1 2015 if you count exporting via drawDOM as significant.

Looking at the Roadmap (http://www.telerik.com/support/whats-new/kendo-ui/roadmap) there is nothing relating to the map.

http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback has many feature requests that would make a big difference to the map, but virtually none of them have been implemented. For example (http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/5905068-marker-clustering-support-on-kendo-ui-map)  has a large numbers of votes and has been around for over 2 years 

Given the above, from my perspective it looks like functionality wise the map control is stagnant. Therefore we are not filled with confidence in using it in our map-centric application.

Can you offer any insight into whether or not this is a valid conclusion, and also into relevant future plans (if any)

Thanks

 

 

 

 

 

T. Tsonev
Telerik team
 answered on 12 Jan 2017
1 answer
207 views

When trying to input some data into the field in the filter menu from the column menu, the menu collapses making the filtering totally unusable.

This bug can be seen on the Kendo UI demo pages
http://demos.telerik.com/kendo-ui/grid/frozen-columns

I have created a screen recording showing the issue.

I am using Windows 10 latest + Chrome latest

 

Dimiter Topalov
Telerik team
 answered on 12 Jan 2017
1 answer
90 views

Hi Team,

In a locked column in grid, When tablet orientation change continuously multiple times with some fast speed, the selected row is dividend in different selected row for locked and unlocked column. This is a intermittent issue. While moving in slow pace this issue may or may not occur.

Mahaveer
Top achievements
Rank 1
 answered on 12 Jan 2017
3 answers
1.6K+ views

I've configured my kendo grid to call a custom service upon clicking "Save Changes" button.  Function call is as follows:

saveChanges: function (e) {
 
    e.preventDefault();
    $scope.updateLineItems(e);
 
    // Clear red triangles on edited cells
    $scope.grid.refresh();
},

 

Does calling preventDefault() prevent the grid from resetting the return value of hasChanges()?  When I make a change the value is true.  I was hoping that after clicking "Save Changes" it would revert to false, but it does not.  I tried adding a line after the grid refresh to manually run the cancelChanges() method, but that undid the changes in the grid display.

Is there any other method to take the grid out of edit mode?

Thanks in advance

 

Boyan Dimitrov
Telerik team
 answered on 12 Jan 2017
1 answer
124 views

Hello,

I'm using scheduler in a very simple mode - a read-only month view. I'd like to read from the server every time the user navigates. I have found some sample code on this forum from 2013, however the latest library code is a bit different.

Anyway, I have an ALMOST working solution. I have serverFiltering = true, and my Controller method is set up to work with DataSource filtering:

public virtual JsonResult HistoryData(Guid id, [DataSourceRequest] DataSourceRequest request)

However, the scheduler JS library fails because it expects the data to some back in a simple list format. The controller is obviously returning a "filterable" format like so:

Data->

    Total:1

     Filters: ...

     Errors: ...

     Data: [...]

 

So my question is, if we're using serverFilterable flag to force the reads, shouldn't I be able to use [DataSourceRequest] in my controller?
Could you please provide an up-to-date MVC project sample for this scenario?

Many thanks.

Veselin Tsvetanov
Telerik team
 answered on 12 Jan 2017
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?