Telerik Forums
Kendo UI for jQuery Forum
0 answers
549 views
Hi,

I have 2 grids on the same page. Selecting a record from the first one should pass and id to the datasource for the second grid and then the second grid loads according to the appropriate id selected.

how can i refresh the datasource2 to pass a new url to the second grid each time. I am using $("#grid1").data("kendoGrid").dataSource.read();
to refresh datasource2 each time on select but unable to pass the id to the other grid.

if i define it inside a function- grid 2 does not find datasource2. if the var declaration for datasource2 is open- unable to pass the dynamic id to it.

here is code snippet :
 dataSource2 = new kendo.data.DataSource({
        
                   transport: {
               read: {url:vid + "properties.json",
                         dataType:"json"}
        },
        pageSize: 3,     

               }); 
}


var dataSource = new kendo.data.DataSource({
        
        transport: {
            read: {url:"topics.json",
                      dataType:"json"}
        },
        schema: {
            model: {
                id: "topic_id",
                fields: {
                    TopicID: { type: "string" },                    
                    name: { type: "string" },
parent_topic_name: { type: "string" },
                    owner_name: { type: "string" },
description: {type: "string"},

                }
            }
        },

        pageSize: 8,       

    });



function creategrid1(){
 

$("#grid1").kendoGrid({
    dataSource: dataSource2,   
    pageable: true,
    selectable: true,
autoBind: false,
toolbar: kendo.template($("#template").html()),
   columns: ["topic_property_id", "name","data_type","sort_order","description"]
   
});
}


$("#grid").kendoGrid({
    dataSource: dataSource,   
    pageable: true,
    selectable: true,
toolbar: kendo.template($("#template").html()),
    columns: ["topic_id", "name","parent_topic_name","owner_name","description"],

    change: function() {
        var row = this.select();
        var id = row.data("id");


vid=id;
readid(vid)         

$("#grid1").data("kendoGrid").dataSource.read();


}
});

creategrid1();
Rahul
Top achievements
Rank 1
 asked on 07 Jan 2012
1 answer
114 views
I'm having trouble display the labels in the xaxis and drawing the lines (yes, the most basic parts of charting :). I've got a jsfiddle project (http://jsfiddle.net/XUmFR/50/) that has the data I'm using and the code I've tried so far. 

Right now, I'm having two basic problems with it. 

  1. Can't get the value in the template for the xaxis label. I want to format the date using the commented out template (uses Sugar.js), but the value is undefined.
  2. The Counts aren't showing up (though I haven't spent much time on this problem yet). The lines are flat even though the counts have values in them.

Basically I'm building a sample application to evaluate Kendo UI. The application shows charts of errors through a specified time period (the errors are logged by Elmah). I want to show one line in the chart for each application that we manage.

Any help is appreciated. Thanks.
Brian
Top achievements
Rank 1
 answered on 07 Jan 2012
2 answers
92 views
I have an aspx page which returns the following data:


{
  "TASKS": [
    {
      "TASK_ID": 101153,
      "TASK_TYPE": "Ticket",
      "TITLE": "This is not working 1",
      "PRIORITY": "Unassigned"
    },
    {
      "TASK_ID": 101159,
      "TASK_TYPE": "Ticket",
      "TITLE": "This is not working 2",
      "PRIORITY": "Unassigned"
    },
    {
      "TASK_ID": 101091,
      "TASK_TYPE": "Ticket",
      "TITLE": "This is not working 3",
 "PRIORITY": "Unassigned"
    }]
}

The content type is "application/json", yet no matter what I do, I can not get the grid to load this data.  Can someone help?
Jay
Top achievements
Rank 2
 answered on 07 Jan 2012
3 answers
908 views
I have a grid that is bound to a data-source with a schema - if I defined the grid editable, and the data-source has a schena that defines what fields are editable, and how to edit them.

If I define the type of a field as string - I get an editor that is one line only. Is there a way to define an editor that allows multiple lines (either dynamically when recognizing an enter key, or with a pre-defined line count)?

My current schema looks like:

 schema: {
          model: {
             id: "ID",
             fields: {
                  ID :{editable: false, nullable: false},
                  Time: { editable: false, nullable: true },
                  Monday: { type: "string" },
                  Tuesday: { type: "string" },
                  Wednesday: { type: "string" },
                  Thursday: { type: "string" },
                  Friday: { type: "string" },
                  Saturday: { type: "string" },
                  Sunday: { type: "string" }
             }
          } // model
João
Top achievements
Rank 1
 answered on 06 Jan 2012
0 answers
104 views
Instead of having an in-line text box like feature when adding or editing on grid, Is it possible to create a popup like form when the buttons are clicked on the tool bar of the grid? Can someone direct me when i can find an example if it has been done before or possibly show me how its done?

Thanks Allot,
Hemchand
Top achievements
Rank 1
 asked on 06 Jan 2012
1 answer
277 views
Hi,

We are using the kendo validator and running into issues using input boxes in an array (name="something[]")
Using firebug to add the square brackets to the name on your own demos throws exactly the same error.

Strangely enough in one situation the array and validator do work together but in most they don't.
In the one situation that does work, I find it breaks with the same error if any field doesn't validate.
Where it always fails it does validate correctly if the array is removed.

I am a commercial customer so please let me know if a hotfix for this is released.

      1. Uncaught Syntax error, unrecognized expression: [data-for=drop[]]
        1. Sizzle.errorjquery.js:4241
        2. Sizzle.filterjquery.js:4227
        3. jQuery.fn.extend.findjquery.js:5401
        4. d.extend._validateInputkendo.all.min.js:11
        5. d.extend.validatekendo.all.min.js:11
        6. submitQuote

Rosen
Telerik team
 answered on 06 Jan 2012
3 answers
383 views
Hi,

The following code to do something when AutoComplete receives focus is not triggering the function specified when AutoComplete receives focus:

            function window_onload() {
                //pageLoad();
                document.getElementById("imgAjax").style.display = "none";
                window.focus();
                 
                $(document).ready(function() {
                    $("#go_autoCompleteInput").kendoAutoComplete({
                        separator: "  ",
                        minLength: 3,
                        dataTextField: "value",
 
 
.... othere code
 
                });
 
                go_autoCompleteInput = $("#autoCompleteInput").data("kendoAutoComplete")
 
            };
 
            function _autoCompleteInput_onfocus() {
                alert("'autoCompleteInput' 'onfocus' event just started executing.");
                go_CheckBoxContentAreaEnabled.checked = false;
            }

Can you tell me what I am doing wrong?

many Thanks,

Donald



Georgi Krustev
Telerik team
 answered on 06 Jan 2012
2 answers
182 views
Hello,

I am currently experiencing a problem with the animation of a modal window.

<div id="remove-window" class="window">
    <p>Wilt u  het geselecteerde item  verwijderen?</p>
    <button onclick="bsv.edf.web.client.grid.remove_confirm('/Service/PersonService.svc/json/Delete',bsv.edf.web.client.grid.removed)" class="k-button">Ja</button>
    <button onclick="bsv.edf.web.client.grid.remove_cancel()" class="k-button">Nee</button>
</div>
This is the window

// user wants to remove a select item
pub.remove = function () {
    var Object = bsv.edf.web.client.grid.getSelectedItem();
    if (Object != null) {
        $("#remove-window").kendoWindow({ resizable: false, title: "Item verwijderen", modal: true, actions: ["Close"] });
        var window = $("#remove-window").data("kendoWindow");
        window.center();
        window.open();
    }
};
 
// user wants to cancel the remove
pub.remove_cancel = function () {
    var window = $("#remove-window").data("kendoWindow");
    window.close();
};
the pub.remove is called when i want to delete an item
and the pub.remove_cancel is called when we cancel the remove
the remove_cancel is actualy behaving correctly the problem lies with the Close button in the top-right corner
When i press the Close button the window closes correctly with the correct animation but when i then open the window again with the pub.remove function the start gray-out animation doesn't display.
A. Drost
Top achievements
Rank 1
 answered on 06 Jan 2012
3 answers
162 views
When accessing the datepicker from an ipad, the ipad’s keyboard opens and it is difficult to use the calendar. I am unable to move to the next month. Is there a work-around for this?
Georgi Krustev
Telerik team
 answered on 06 Jan 2012
1 answer
102 views
How do I do this?  Don't see any examples or docs that would help with this.  Let's say I had a tabstrip and got the selected tab value, and I want to filter a grid based on that text value -- how do I do that?  The real question is how do I pass a value to the grid to filter on?
Atanas Korchev
Telerik team
 answered on 06 Jan 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
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
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
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?