Telerik Forums
Kendo UI for jQuery Forum
1 answer
135 views
I can get the grid working with master detail, but when i post a row create to my json endpoint the primary key of the row doesn't get updated in the grid and the opening of the detail view fails. I expect a refresh of the data after the creation of the row to get the primary key, or does the transport create endpoint somehow has to return the primary key?

Thanx
Andre Broers
Top achievements
Rank 1
 answered on 17 Feb 2012
1 answer
138 views
Hi there,

this is a strange one and took me a while to troubleshoot, but basically, if you have jQuery UI included in your website and you try to use Kendo UI charts, if you try and load the page but switch to another tab, when you come back to the tab with the chart on it, the chart's animation either a) doesn't work at all or b) only partially works or c) actually works (rarely). If you keep the tab in focus, the animation plays out perfectly.

Here's an example I set up which exhibits this behaviour in both FF and Chrome: http://jsfiddle.net/mdvxG/

To replicate, hit the "run" button and quickly switch tabs, then after a couple of seconds, switch back. Most of the time, you'll observe that the chart has not played out its animation successfully. Compare with just hitting the "run" button without switching tabs.
T. Tsonev
Telerik team
 answered on 17 Feb 2012
8 answers
332 views
I have recreated this event using an extremely simple setup.

A Picture is worth a thousand words

See picture above.

  1. Create FolderA and FolderB
  2. Put Parent page in FolderA
  3. Put Modal Window page in FolderB
  4. Evoke a modal window from FolderA - setting the content to a page in FolderB
  5. Perform a Post submit
404 error occurs saying FolderA\Child.aspx does not exist


Dimo
Telerik team
 answered on 17 Feb 2012
0 answers
146 views
Hi ,
   I am using 2 panes in my window , on one pane i have used tree view and add some nodes now i want to drag the list items from one pane to the main pane which is basically a workspace .
Can anyone help ??
Ruby
Top achievements
Rank 1
 asked on 17 Feb 2012
0 answers
88 views
I have a splitter pane with a scrollbar and I'm try to do a simple scroll to top with jQuery.
Here is the Javascript:
$('a[href=#top]').click(function () {
            $('html, body').animate({ scrollTop: 0 }, 'slow');
             return false;
});


Problem is, it doesn't work. Not matter if you give the ID of the pane or splitter itself, nothing works. Is there a simple fix for this or am I missing something?
Gabriel
Top achievements
Rank 1
 asked on 17 Feb 2012
3 answers
141 views
Hi, 

I am creating a grid using row templates with custom upload and download buttons for individual rows.These buttons are anchor links with their class set to k-button. I am attaching a click handler to these buttons using the jquery delegate function. My code runs fine in chrome but when I try it ie9 nothing happens when I click the buttons. The weird thing is if start developer tools (by pressing F12) everything starts running fine. Can anyone explain what may be causing this issue. I am using the jquery.js files provided with kendo.

Code excerpts for reference as shown below
<!-- HTML code -->
<table id="grid">     
    <thead>
        .....
    </thead>            
</table> 

<script id="rowTemplate" type="text/x-kendo-tmpl">
    <tr >
        ..
        <td>                        
            <a id="delete" class='k-button' data-event="delete"><span class='k-icon k-delete'>Delete</span></a>
            <a id="download" class='k-button' data-event="download"><span class='k-downloadicon'>Download</span></a>                                </td>
    </tr>
</script>

 <script type="text/javascript">

    $(function () {        
        $(document).ready(function () {
            
            var dataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        ...
                    },                    
                    destroy: {
                        ...
                    }
                },                
                ....
            });

            $("#grid").kendoGrid({
                dataSource: dataSource,                
                rowTemplate: kendo.template($("#rowTemplate").html()),
                ...
            });

            $(document).delegate(".k-button", "click", function (e) {
                var that = $(this),
                eventData = that.data("event");
                if (eventData != null) {
                    _clickHandlers[eventData](e);
                }
            });


            _clickHandlers = {


                "delete": function (event) {
                    console.log("delete");
                    ....
                },
                "download": function (event) {
                    console.log("download");
                    .....
                } 
            }

        });
    });
</script>


Joel
Top achievements
Rank 1
 answered on 16 Feb 2012
0 answers
98 views
I thought I'd offer a potential solution to a problem that took me awhile to solve.  Perhaps the Kendo team will consider exposing a method that will make this easier in the future.

I have a search form with a text field and two radio buttons.  The radio buttons are labelled "User ID" and Username."  The user searches for other users in the system by selecting the appropriate criteria by which to search (userid or username) and typing their text in the field.  What I wanted was to provide autocomplete suggestions that pertained to the search criteria.  So if the user has selected Username, the suggestions will be a list of usernames.

Here's how I did it.

JSON pseudo-code of datasource
suggestions: {
   userIds: [],
   userNames: []
}

$(document).ready(function ()
{
    $(":radio").bind('click', setAutoComplete);
    initSuggestions();
}

var initSuggestions = function()
{
    suggestionDS.one('change', function()
    {
          // suggestions is a global variable allowing us to hit
        // this datasource only once.
        suggestions = suggestionDS.data();
        $("#textField").kendoAutoComplete( suggestions.userIds );        
    });
    suggestionDS.read();
}

var setAutoComplete = function()
{    
    // Grab a reference to the autoComplete
    var ac = $("#textField").data("kendoAutoComplete");
    
    // Remove all of its suggestions
    ac.options.dataSource.splice(0, ac.options.dataSource.length);
    
    // Get the correct array based on the user's radio button selection
    var arr = $(":radio:checked").val() == "userIds" ? suggestions.userIds : suggestions.userNames;
    
    // Push all of the elements onto the autocomplete's datasource.
    for( x in arr )
    {
        ac.options.dataSource.push(arr[x]);
    }
}
Sean
Top achievements
Rank 1
 asked on 16 Feb 2012
3 answers
692 views

I have two pages.

The parent: /Main/Home.aspx

The child modal: /Main/MoveJob.aspx

The modal window is a simple form with a Submit button.  The parent opens modal window. When the modal window’s submit button is pressed, the browsers URL is incorrectly redirected to the modal window’s URL.

Parent’s Code is as follows:

     <!-- Define the HTML table, with rows, columns, and data -->
     <table class="jobsGrid">
      <thead>
          <tr>
              <th data-field="title">Job #</th>
              <th data-field="Type">Type of Project</th>
              <th data-field="Desc">Description</th>
              <th data-field="Brand">Brand</th>
              <th data-field="Milestone">Next Milestone</th>
              <th data-field="Location">Job Location</th>
              <th data-field="Sub">Submitter</th>
              <th data-field="move"></th>
          </tr>
      </thead>
      <tbody>
    
          <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
            <tr>
              <td><%# Eval("JobID")%></td>
              <td><%# Eval("JobTypeName")%></td>
              <td><a href="#"><%# Eval("JobName")%></a></td>
              <td><%# Eval("BrandName")%></td>
              <td>coming soon</td>
              <td><%# Eval("LocationName")%></td>
              <td><%# Eval("SubmitterName")%></td>
              <td><a href="javaScript:;" data-url="../Main/MoveJob.aspx" title="Move Job" class="moveLink" data-id="<%# Eval("JobID")%>">Move</a></td>
            </tr>
            </ItemTemplate>
          </asp:Repeater>
      </tbody>
     </table>
 
        <div class="moveWindow">
        </div>
 
 
 
<script type="text/javascript">
    function refreshGrid() {
        //alert("I will try to refresh the grid");
        var grid = $(".jobsGrid").data("kendoGrid");
        grid.refresh();
    }
 
    //MOVE WINDOW
    $(document).ready(function () {
 
        $(".jobsGrid").kendoGrid();
 
        $(".moveLink").click(function () {
            var id = $(this).data("id");
            var href = $(this).data("url") + "?jobId=" + id;
            var title = $(this).attr("title");
            var myWin = $(".moveWindow");
 
            if (!myWin.data("kendoWindow")) {
                // window not yet initialized
                myWin.kendoWindow({
                    width: "auto",
                    height: "auto",
                    modal: true,
                    resizable: true,
                    title: title,
                    content: href
                });
            } else {
                // reopening window
                myWin.data("kendoWindow")
                .content("Loading...") // add loading message
                .center()
                .refresh(href) // request the URL via AJAX
                .open(); // open the window
 
            }
 
            return false;
        });
    });
 
 
 
 
</script>

Jeremy
Top achievements
Rank 1
 answered on 16 Feb 2012
5 answers
157 views
Hi,

Your site's login is not compatible with www.lastpass.com and that makes the use of your site very inconvenient.  Do you have plans to use something more compatible for your credentials popup?

Thanks!

PS: Using Safari on a Mac with latest LastPass for Safari.
Georgi Tunev
Telerik team
 answered on 16 Feb 2012
6 answers
153 views
Hi!

KendoUI is fantastic, however one problem. I am trying to set a custom template on a column chart for its tooltip, however it seems to be unable to find the fields specified.

Datasource:
var usageData = @Html.Raw(@ServiceStack.Text.JsonSerializer.SerializeToString(Model.ParkingStats));

Code:
$('#chart-utilization').kendoChart({ 
    title: {
        text: "Parking utilization for week"
    },
    dataSource:{
        data: usageData[0].Usage
    },
    series:[{
        type: "column",
        field: "Max",
        name: "Max utilization"
    }],
    categoryAxis:{
        field: "Week"
    },
    tooltip: {
        visible: true,
        template: "${ Max } of ${ Capacity }"
    },
    legend: {
        visible: false
    }
});

The 'Max' and when changed 'Capacity' renders correct columns. But the template can't find either fields and throws a NullReferenceException.


Thanks in advance for your pro-tips ;-) !

Finest regards.
Alexander Valchev
Telerik team
 answered on 16 Feb 2012
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?