Telerik Forums
Kendo UI for jQuery Forum
1 answer
259 views
I'm selecting a node on a TreeView programmatically. How would I expand all parent nodes and scroll the node into the viewport? Thanks!
Alex Gyoshev
Telerik team
 answered on 03 Jun 2014
1 answer
124 views
Hello,

I use a custom delete operation to delete a row on a successful delete via REST. I also use a custom method to get a new row which pretty much inserts just an empty row at the end of all entries. My problem is that when I delete an item an then try to add one again, I don't see a new row, only when I hit the sorting then I see the empty row.
Alexander Popov
Telerik team
 answered on 03 Jun 2014
1 answer
316 views
Can someone please explain how to make a custom editor template that has no concept of time zones? 

My attempts to turn them off still lead to end times being converted which caused start comparisons to end to be invalid.

Vladimir Iliev
Telerik team
 answered on 03 Jun 2014
2 answers
760 views
I have a grid defined like this: I'll refer to it as grid A.

@(Html.Kendo().Grid<My.NameSpace.ViewModel>()
 .Name("grid")
 .Columns(columns =>
 {
 columns.Bound(p => p.ColumnA)
 columns.Bound(p => p.ColumnB).Width(130);
 columns.Bound(p => p.ColumnC);
 columns.Bound(p => p.ColumnD).Width(130);
 columns.Command(command => { command.Edit(); }).Width(160);
 })
 .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("EditingTemplate"))
 .Events(e => e.Edit("onEdit"))
 .Pageable()
 .Sortable()
 .Scrollable()
 .HtmlAttributes(new { style = "height:430px;" })
 .DataSource(dataSource => dataSource
 .Ajax()
 .PageSize(20)
 .Events(events => events.Error("error_handler"))
 .Model(model => model.Id(p => p.ViewModelID))
 .Create(update => update.Action("A_Create", "ControllerName"))
 .Read(read => read.Action("A_read", "ControllerName"))
 .Update(update => update.Action("A_Update", "ControllerName"))
 .Destroy(update => update.Action("A_Destroy", "ControllerName"))
 )

When the user clicks the "Edit" button in the grid, and thus launches "EditingTemplate" I want to pass the ID from the model of the selected row to the "EditingTemplate". The reason for this, is I want to pass the ID to another kendo grid that exists on the "EditingTemplate". I will refer to that as grid B. 

I have defined an "additionalData" function that is called by the read method on grid B, so I have   

.Read(read => read.Action("B_read","ControllerName").data("additionalData"))

function additionalData() {
var myID = %%How do I get this value from the selected row to edit from grid A?%%

return {
  ViewModelID: myID
 }
}

So far I have tried setting the value on a hidden field in grid A's "edit" event, and then retrieving it in additionalData, however the methods fire in the wrong order, so first additionalData fires, then the edit event fires. additionalData never is able to access the value.

I have also tried things in the additionalData to like below, however the result is always "undefined"

var item = $("#grid").data("kendoGrid").model/dataItem/data/item

I have also tried

var grid = $("#grid").data("kendoGrid");
var item = grid.dataItem(grid.select());

This produces the following error in Kendo.all.js

Unhandled exception at line 36448, column 13 in http://SERVERNAME/Scripts/kendo/kendo.all.js0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'value': object is null or undefinedIf there is a handler for this exception, the program may be safely continued.

None of the above options work. I don't understand why this is so difficult to do. Can someone show me the correct way of doing this?

Thanks  

Dave
Top achievements
Rank 1
 answered on 02 Jun 2014
3 answers
238 views
I need notification hiding to be stopped when hovering over a notification. Can you give me a suggestion to attach this feature to kendo notification . 
Dimiter Madjarov
Telerik team
 answered on 02 Jun 2014
1 answer
113 views
Hi,

I have a grid(Grid1) with popup Edit. And On Popup Edit of Grid1 have a another Grid2 with popup2 Editable enabled.


I want to have control on Save2  button of popup2; for the data to be pushed on to grid2  based on input of popup2.

Basically I am trying to push more data values   to griddatasource as per grid model based on selection on popup2 window which has minimum fields show.


Thanks,
Chatrapathi Chennam
Vladimir Iliev
Telerik team
 answered on 02 Jun 2014
1 answer
297 views
The problem I am having is, I have 12 rows in my Grid and only 1 checkbox is appearing. right in the middle.
Here is my Code.

<!DOCTYPE html>
<html>
<head>
    <style>
        html {
            font-size: 9px;
            font-family: 'Segoe UI';
        }
    </style>
    <title>Grid With CheckBox</title>
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.mobile.min.css" rel="stylesheet" />
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>
<body>
    <div data-role="view" id="tabstrip-ticker" data-title="Grid With Checkbox" data-layout="mobile-tabstrip">
        <ul data-role="listview" data-style="inset" data-type="group">
            <li>
                Test Grid With CheckBox
                <ul>
                    <li>
                        <div id="revgrid" style="width: 100%; margin-left: auto; margin-right: auto; font-size: 9px; float: left;"></div>
                    </li>
                </ul>
            </li>
        </ul>
</div>
    <div data-role="layout" data-id="mobile-tabstrip">
        <header data-role="header">
            <div data-role="navbar">
                <!--<a class="nav-button" data-align="left" data-role="backbutton">Back</a>-->
                <span data-role="view-title"></span>
                <a data-align="right" data-role="button" class="nav-button" href="#/">Home</a>
            </div>
        </header>
 
        <p>TabStrip</p>
 
        <div data-role="footer">
            <div data-role="tabstrip">
                <a href="#tabstrip-ticker" data-icon="info">Home</a>
            </div>
        </div>
    </div>
    <style scoped>
        #tabstrip-profile h2 {
            display: inline-block;
            font-size: 1.1em;
            margin: 1.5em 0 0 .7em;
        }
 
            #tabstrip-profile h2 span {
                display: block;
                clear: both;
                font-size: 1.8em;
                margin: .1em 0 0 0;
            }
 
        #tabstrip-profile img {
            width: 5em;
            height: 5em;
            float: left;
            margin: 1em;
            border: 1px solid rgba(0,0,0,.2);
            -webkit-border-radius: 4em;
            border-radius: 4em;
        }
 
        .sales-down,
        .sales-hold,
        .sales-up,
        .value {
            float: right;
        }
 
        .sales-up {
            color: green;
        }
 
        .sales-down {
            color: red;
        }
 
        .sales-hold {
            color: blue;
        }
 
        .value {
            color: #bbb;
        }
    </style>
    <script>
         
        $(document).ready(function () {
            var RevSource = [
                { "BookYear": "JPLN/15", "RevHandled": "$1500.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1600.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1700.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1800.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1500.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1600.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1700.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1800.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1500.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1600.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1700.00", "RepCode": "TJN" },
                { "BookYear": "JPLN/15", "RevHandled": "$1800.00", "RepCode": "TJN" }
            ];
 
            $("#revgrid").kendoGrid({
                dataSource: RevSource,
                selectable: "multiple row",
                columns: [
                    { field: "BookYear", title: "Book/Year" },
                    { field: "RevHandled", title: "Rev Handled", format: "{0:c}" },
                    { field: "RepCode", title: "Rep Code" },
                    {
                        field: "Select",
                        title: "Select",
                        headerTemplate: '<input type="checkbox" id="check-all" /><label for="check-all">Select</label>',
                        template: '<input type="checkbox" id="selectbox" />'
                    }
                ]
            });
 
             
        });
    </script>
    <script>
    var app = new kendo.mobile.Application(document.body, {
        transition: 'slide'
    });
    localStorage.clear();
    function showLoading() {
        app.showLoading();
        setTimeout(function () {
            app.changeLoadingMessage("Please wait...");
        }, 1000);
    }
    $(function () {
        app.skin("flat");
    });
    </script>
 
</body>
</html>


Thank you

Troy
Kiril Nikolov
Telerik team
 answered on 02 Jun 2014
1 answer
150 views
Hello,

It is possible that with the last update (2014.1.416) there was introduced some optimization which in fact break some functionality.
Here is what I observed:
We had in our code

tabstrip.Add().Text("Tab caption").Content("").Enabled(false);

This will produce  a markup for the tab ear which includes an aria-controls="undefined"

Further debuging reflects a possible bug on the _updateContentElements function, it seems that content elements are not rendere anymore for the tabs with empty content. This will result in the following if being evaluated to TRUE
if (contentElements.length && (items.length > contentElements.length)) {

and inside of it the aria-controls is somehow messed up because first is assumed that there is an area-controls , then an "aria" data is set, and then the aria-controls is set from the "aria" data, this results in the end in to aria-controls = "undefined"

To workaround this issue I had to change the above line to something similar to

tabstrip.Add().Text("Tab caption").Content("&nbsp;").Enabled(false);

This will make the IF above being evaluated as FALSE and then the other path creates proper aria-controls attribute

The problem is that with this approach the tabs behave like "disabled" but they does not look like disabled.

Vasile
Kamen Bundev
Telerik team
 answered on 02 Jun 2014
5 answers
1.6K+ views
Hello,

I currently have the problem that I use the standard read method to get information from the REST endpoint of a Crm 2013 Server. The results have a format like:

data:{
  d:{
    results:[{Name: "Test1"},{Name: "Test2"},{Name: "Test3"},...]
  }
}

This leads to huge problems in the DataSource.fn.success function because only an array is expected there and within the function that._pristineData = data.slice(0); fails with "Uncaught TypeError: undefined is not a function.

Is there now any way to provide different data on success of the read in a dataSource?
Nikolay Rusev
Telerik team
 answered on 02 Jun 2014
1 answer
315 views
Hi,
We have a requirement where a screen has the option for the user to choose the columns of the grid. How can we achieve this dynamic behavior in Kendo?

Sid
Sebastian
Telerik team
 answered on 02 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
Drag and Drop
Application
Map
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
DropDownTree
ListBox
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
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?