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

I have an app that is divided into several parts...to make it simple, let's just consider a menu and a main area. 

My menu is created on my main layout file. So I have a kendo.bind(document.body,mainVM) on this page.

My main area has another kendo.bind(document.body,areaVM) 

Usually I have a grid on my main area, and because I want to format it nicely, I call the grid.kendoGrid() function on it. 

This makes the MVVM go crazy, because it can't track anymore which elements are bound to which vm (mainVM or areaVM). 

My grid also goes crazy, as it creates two divs for content, making the layout really bizarre. 

I have created a jsfiddle that reproduces the scenario described above. http://jsfiddle.net/aoliveira/WTuYX/2/

I do know that I could fix that by just scoping my kendo.bind call to the given area, but I would like to have at least my mainVM be boud to document.body and have my areaVM boud to some area div...but that seems to create problems also.

So the questions are :

1 - Will there be any way for kendo mvvm to track what is bound to what ?
2 - Is using bind on document.body completely wrong ?


Thanks, 

Alvaro Oliveira.





Alvaro
Top achievements
Rank 1
 asked on 28 May 2012
0 answers
349 views
Hello, I'm new! i have a problem creating a grid with codeigniter...i dont know how to write my kendo script. here is my code in codeigniter: 
CONTROLLER:

function read() {

    echo(json_encode($this->news_model->read());

}

function update() {
    $records = json_decode(stripslashes($this->input->get(‘models’)), true);
    $this->news_model->update($records);
}

function destroy() {
$records = json_decode(stripslashes($this->input->get(‘models’)), true);

$this->news_model->destroy($records);

}

function create() {
$records = json_decode(stripslashes($this->input->get(‘models’)), true);

$this->news_model->create($records);

}

 MODEL

function read() {
    $this->db->select(“*”);
    $query = $this->db->get(‘news’);
    if($query->num_rows() > 0) {
        $newsList = array();
        foreach($query->result() as $news) {
            $newsList[] = $news;
        }
        return($newsList);
    }
}

function update($records) {
    foreach($records as $r) {
        $this->db->where(‘id’, $r['id']);
        $this->db->update(‘news’, $r);
    }
}

function destroy($records) {

    foreach($records as $r) {

        $this->db->where(‘id’, $r['id']);
        $this->db->delete(‘news’);
    }
}

function create($records) {

    foreach($records as $r) {
        $this->db->insert(‘news’, $r);
    }
}

and now how i put this in the grid??
Ricardo
Top achievements
Rank 1
 asked on 28 May 2012
1 answer
97 views
Hi, is there any posibility to change all Kendo strings in app? In culture files there are months and days of the week, but I want to have "Select" in file upload in other languages than english.
Patrick Rioux
Top achievements
Rank 1
 answered on 27 May 2012
0 answers
102 views
Hi,
 i am new to kendoui  and i would like to suggest that the current ASP.NET controls should be using KendoUi instead of integrating asp controls with kendoui manually it should be supported as they are from same company. i.e i can use the grid and i can chose between kendoui grid , Telerik Grid or normal asp grid.

Regards,
Owidat
Owidat
Top achievements
Rank 2
 asked on 27 May 2012
0 answers
134 views
Hi,

We are evaluating Kendo UI and I have a question regarding Listview.
is it possible to display a Listview inside another Listview? If so, can you please provide a sample?

Thanks,

Indira
Top achievements
Rank 1
 asked on 27 May 2012
1 answer
650 views
HI,

I am following http://demos.kendoui.com/web/grid/editing-popup.html example of  yours and in my case i have one checkbox(Notify) and two number type columns(Notification Amount & Performed Every). what i want to do is disabling the two number type columns(Notification Amount & Performed Every) when checkbox type column(Notify) is is unchecked and enabling these when checkbox is checked..

The code is as follows:

 var dataSourceForAssetType = new kendo.data.DataSource({
            transport: {
                read: {
                    url: '@Url.Action("AssetType", "Home")',
                    dataType: "jsonp"
                },
                destroy: {
                    url: '@Url.Action("DeleteAssetType", "Home")',
                    dataType: "jsonp"
                },
                create: {
                    url: '@Url.Action("CreateAssetType", "Home")',
                    dataType: "jsonp"
                },
                update: {
                    url: '@Url.Action("UpdateAssetType", "Home")',
                    dataType: "jsonp"
                },
                parameterMap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                }

            },
            pageSize: 5,
            schema: {
                model: {
                    id: "AssetTypeID",
                    fields: {
                        AssetTypeID: { editable: false },
                        Description: { validation: { required: true} },
                        Notify: { type: "boolean" },
                        NotificationAmount: { type: "number" },
                        PerformedEvery: { type: "number" }
                    }
                }
            }
        });

        $("#grdAssetType").kendoGrid({
            dataSource: dataSourceForAssetType,
            pageable: true,
            resizable: true,
            groupable: true,
            toolbar: ["create"],
            columns: [
                { field: "Description", title: "Description" },
                { field: "Notify", title: "Notify ?" },
                { field: "NotificationAmount", title: "Notification Amount(Days)" },
                { field: "PerformedEvery", title: "Performed Every(Days before due)" },
                { command: ["edit"], title: " ", width: "100px" },
                { command: ["destroy"], title: " ", width: "100px"}],
            editable: "popup"
        });

How can i achieve these.

I Have also applied my custom editor for the checkbox column with custom attribute so to recognize the textbox and change the behaviour with the jquery.attr property like below:

editor: function (container, options) {
                        $('<input type="checkbox" myattr="notifyattr" name="' + options.field + '"/>')
                            .appendTo(container);
                    }
but now i am losing binding for this field.

Can you please help me out with the solution for this?
charan
Top achievements
Rank 1
 answered on 26 May 2012
1 answer
128 views
Hi, how do i get values for the GROUP aggregates to use in my own function.  This works with grid aggregates but I can't access the group aggregates for field "channel".

group: {
     field: "channel", aggregates: [
        { field: "sales_7_days", aggregate: "sum" },
        { field: "current_inventory", aggregate: "sum" }
         ]
},

Then in the field:
groupFooterTemplate: "#=kendo.toString(doMath('weeks_inventory'), 'n1')#"

The function doMath is using ds.aggregates() which works for grid level but not for group level!

Please help!
Thanks!
Sal
Top achievements
Rank 1
 answered on 25 May 2012
5 answers
251 views
When constructing a treeview, is it possible for me to provide a template to use when rendering the data provided in the dataSource object?
Mike
Top achievements
Rank 1
 answered on 25 May 2012
1 answer
71 views
Hi Guys,

Are there any limitations in storing local data in backend. Means how much data can we store in backend.

thanks,
prashant
Prashanth
Top achievements
Rank 1
 answered on 25 May 2012
3 answers
115 views
Hello,

I am using Kendo datasoure with kendo grid for inline editing.
When i add/create a new row, the new row is posted to my create URL(i am using post). my problem is in the query params, the value of the id field is zero, is there a way to make it empty or remove it from the query string, in some js event.before posting it to the create url.

Thanks.
Prashanth
Top achievements
Rank 1
 answered on 25 May 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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?