Telerik Forums
Kendo UI for jQuery Forum
2 answers
137 views

Good Morning,

I have two dropdownlists on the same page. The first for 'TimePeriodId' is added via a view through showIn a kendo.Layout and works perfectly.  The second for 'field' is an inline or popup grid input which loads and displays the list, but upon selection of an item errors out with 'Object Expected'.  All other grid inputs work perfectly.  Though the MVVM for both are logically equivalent, the resultant HTML is different as the validation span appears within the widget rather than after.  Ideas on the source of the error would be greatly appreciated.

Thanks!

Veselin Tsvetanov
Telerik team
 answered on 16 Nov 2017
3 answers
7.5K+ views
Greetings, 
During coding, i needed to dynamically open tabs based on a users actions.  I discovered the use of the li index...works like a charm...

1. Give each tab an ID

<div id="tabStrip">
    <ul>
        <li id="tFirst">First tab</li>
        <li id="tSecond">Second tab</li>
    </ul>
    <div>First tab content</div>
    <div>Second tab content</div>
</div>

2. Use jQuery to get the tab by id (and later the index)
var tabIndx = -1;
var tab = $("#tFirst");
if(tab != null) { //safety check
   tabIndx = tab.index();}           
3. Change the tab...
$("#tabStrip").data("kendoTabStrip").select(tabIndx);

Enjoy.
Ivan Danchev
Telerik team
 answered on 16 Nov 2017
1 answer
788 views

HI
      I'm trying to use kendo UI,I have a problem,i try to new or update a line in the grid,but some fields are not repeated,I verify it on the server,If repeat,create or update fail,how to stop cteate or update,and display a warn message in the kendo ui -grid?

Konstantin Dikov
Telerik team
 answered on 15 Nov 2017
5 answers
979 views

Hello,

the column filter operators is null, is not null, is empty, in not empty have no translations. (in Italian at least)

BR

  Stefano

Viktor Tachev
Telerik team
 answered on 15 Nov 2017
1 answer
122 views
I have shapes from geojson om map and their list. How can I navigate and zoom to shape object with an shape object reference? 
Georgi
Telerik team
 answered on 15 Nov 2017
1 answer
2.1K+ views

I'm having issues refreshing the grid after doing some work post data-bind.

Within the DataBound event on a Kendo Grid I have the following code block:

var items = this.dataSource.data();
 
for (i = 0; i < items.length; i++) {
     
    var row = this.dataSource.at(i);
     
    switch (row.ChangeStatus) {
        case 0:
            row.ChangeStatus = 'Pending';
            break;
        case 1:
            row.ChangeStatus = 'Approved';
            break;
        case 2:
            row.ChangeStatus = 'Declined';
            break;
        default:
            break;
    }
}

 

When I run this and put it through the debugger I can see that the values are updated pretty quickly. To then update the grid I'm calling this.refresh() but I'm seeing a massive slowdown (and sometimes the page becomes unresponsive).

If I remove the call to $('#gridPortChanges').data("kendoGrid").refresh(), the grid renders just fine (albeit with 0,1, 2 in the ChangeStatus field). Additionally, if I manually call refresh() from the developer after the page loads it too runs fairly quickly, so it's only an issue when called from dataBound.

Georgi
Telerik team
 answered on 15 Nov 2017
1 answer
220 views

Hi, I couldn't find a Kendo UI for React forum so I thought I might try to post this here. I am trying to create a toolbar with multiselect dropdowns that have a remote datasource. The intent is to give options for custom filtering for a grid. I tried to go off the examples available but there are no dataSource examples for React for a dropdown/multiselect template in a toolbar. I've tried doing a basic local dataSource example to get started and even that isn't working. Can someone help? 

Here is an excerpt from my code of how I define and render the toolbar. The end goal is to replace the dataSource with a remote dataSource.

...

const toolbarOptions = {

items: [

    { template: "<label for='dropdown'>Materials:</label>"},
    {
          template: "<select id='material-dropdown' style='width: 150px;' />",
          dataSource: [{ item: "Item 1", value: 1 }, { item: "Item 2", value: 2 }],
          dataTextField: "item",
          dataValueField: "value",
          overflow: "never"
    }

 ]

}

 

return(

   <div className="toolbar">

         <ToolBar {...toolbarOptions}/>

   </div>

)

...

Stefan
Telerik team
 answered on 15 Nov 2017
3 answers
783 views

When I try logging in using

npm login --registry=https://registry.npm.telerik.com/ --scope=@progress

 

When prompted for my username, I try my account email (which is my username) in the form person@company.com and person%40company.com. In both cases the login fails with the following error message

npm WARN Username may not contain non-url-safe chars

Ianko
Telerik team
 answered on 15 Nov 2017
3 answers
867 views
See video:
http://screencast.com/t/pHdDhSg26X

It also happens if for example you are on the the 3rd page and you set the grid with
$('grid').data().kendoGrid.dataSource.data([the data])

If the data has less rows then the current page, example, new data 10 rows and you are on page 3 of a grid with 5 rows per page, it says on page 3, which is blank because you have only 10 rows.


Using latest as you can see on the video.
Stefan
Telerik team
 answered on 15 Nov 2017
11 answers
1.4K+ views
Hello, I am trying to use two grids on single page, first one is loaded usingkendo wrapper this way
@(Html.Kendo().Grid<CPSkla.Models.WindScreen>()   
    .Name("GridWinds")
    .Columns(columns =>
    {
        columns.Bound(p => p.Id).Hidden();
        columns.Bound(p => p.Brand);
        columns.Bound(p => p.Model);
        columns.Bound(p => p.Year);
        columns.Bound(p => p.Specification);
        columns.Bound(p => p.Type);
        columns.Bound(p => p.Size);
        columns.Bound(p => p.EuroCode);
        columns.Bound(p => p.Price);
        columns.Bound(p => p.Source);
    })   
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("WindscreenRead", "Calculation").Type(HttpVerbs.Post))
        .Model(model => model.Id(p => p.Id))      
    )
    .Pageable()
    .Sortable()
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row).Enabled(true))
    .Events(events=>events.Change("AccessoriesBind"))
)
This works fine, but the other grid is supposed to be empty until user selects row from this first grid, so I am declaring just columns
@(
 Html.Kendo().Grid<CPSkla.Models.Accessory>().Name("GridAccessories").Columns(columns =>
  {
      columns.Bound(p => p.Id).Hidden();
      columns.Bound(p => p.Brand);
      columns.Bound(p => p.Model);
      columns.Bound(p => p.Year);
      columns.Bound(p => p.Specification);
      columns.Bound(p => p.Type);
      columns.Bound(p => p.Size);
      columns.Bound(p => p.EuroCode);
      columns.Bound(p => p.Price);
      columns.Bound(p => p.Source);
  })
  .Pageable()
  .Sortable()
  .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple))
  .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model => model.Id(p => p.Id))
    )
)

Now I need to fill up the second grid according to selected row in first one, I am using jquery function declared on change event of first grid
<script>
    function AccessoriesBind() {
        var eucode = "";
        var grid = this;               
         
        grid.select().each(function() {
            var dataItem = grid.dataItem($(this));
            eucode += dataItem.EuroCode;
             
        });
        alert(eucode);
        var gridAcc = $("#GridAccessories").data("kendoGrid");
        gridAcc.DataSource = new kendo.data.DataSource({
            transport: {
                read: "/Calculation/AccessoriesRead/" + eucode,
                dataType: "json",
            }
        });
        gridAcc.DataSource.read();
 
    }
</script>
But this last few rows wont fill the table, I tried lots of approaches but always with the same result. My controller is returning valid values in JSON but the table with that return value wont fill up. I tried using generating another kendo grid using just Web UI function kendoGrid on DIV but it didnt wor either. Any advices? Please help.
Konstantin Dikov
Telerik team
 answered on 15 Nov 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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
ContextMenu
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
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?