Telerik Forums
Kendo UI for jQuery Forum
1 answer
658 views
Hi,

From what I understood from the documentation, the kendo.data.Model inherits from the ObservableObject. 

1- Does this mean that I can create a new Model and make it my "viewmodel" in terms of MVVM? Or i should be creating explicitly a viewModel from the ObservableObject?

2- In DataSource schema.model. Why would I define a model on the DataSource schema? Where is it being used? Is the schema.model used to track the records add/deleted/updated? Does it have any role when loading data from server? 

Thanks
Alexander Valchev
Telerik team
 answered on 03 Nov 2014
3 answers
251 views
I'm putting k-i-plus class on a span and the kendo code is changing the style of the parent object to display:none.

Is this intentional, and if so, why?

<div id="COM_Content" class="WholeParent">
    <div id="DIV_COM_ContentArea" class="rounded-corners">
        <div id="DIV_COM_ToolbarL">
            <span style="text-align:left;">
                <span onclick="COM_Add();" id="COM_Add" title="Add new item..." class="k-icon k-i-plus"></span>
                <input id="COM_Filter" type="text" class="k-textbox" onkeydown="COM_Filter_KeyDown(event)" />
                <span onclick="COM_RefreshList();" title="Filter" class="k-icon k-i-funnel"></span>
                <span id="COM_ResetFilter" onclick='$("#COM_Filter").val(""); COM_RefreshList();' title="Clear Filter" class="k-icon k-i-funnel-clear"></span>
            </span>


        </div>
        <div id="DIV_COM_ToolbarR">
            <input type="radio" name="Radio_ShowData" id="COM_Rad_ShowMineOnly" value="1" onselect="ShowData(1)"><Label for="COM_Rad_ShowMineOnly">Show only my data</Label>
            <input type="radio" name="Radio_ShowData" id="COM_Rad_ShowAll" value="0" onselect="ShowData(1)"><Label for="COM_Rad_ShowAll">Show all data visible to me</Label>
        </div>
        <div id="DIV_COM_List">
            <div id="DIV_COM_Tree"></div>
        </div>
    </div>
</div>
Kiril Nikolov
Telerik team
 answered on 03 Nov 2014
1 answer
559 views
Hi,

I'm using a Treeview component with checkboxes but I'm using it more like a list of items, instead of a tree. What I want to do is to disable the selection of the items. I've tried this solution but it still shows an item selection:

.k-treeview .k-in.k-state-hover,
.k-treeview .k-in.k-state-focused,
.k-treeview .k-in.k-state-selected {
    border-color:transparent;
    background-color:transparent;
}

Could I set the items as unselectable or something similar? O do I have to make a Css hack ?

Thanks,
Raul
Alex Gyoshev
Telerik team
 answered on 03 Nov 2014
3 answers
114 views
I'm creating a file explorer of sorts in which the selected node of the treeview on the left updates the content of the grid on the right. And when an item is checked in either widget the other shows it checked too. The treeview filters out the "File" type nodes and only displays the "Folder" type. I need the treeview to show a that a "Folder" node has child items checked if a "File" type node was checked in the grid on the right. However, when a node is filtered out it is no longer considered as a child of it's parent. How can I accomplish this?
Alex Gyoshev
Telerik team
 answered on 03 Nov 2014
3 answers
1.8K+ views
I have a form with some text fields and a kendo upload control.  I want the user to fill out the fields, select an image, then select a Save button at the end to save the information.  I am having trouble sending the file data, it always comes through as null.

I'm going to simplify my code for the example but below is basically what I want:

$(document).ready(function () {
    //kendo file upload control
    $("#files").kendoUpload({
        multiple: false,
        select: onSelect
    });
});
function onSelect(e) {
    if (e.files[0] !== 'undefined') {
        //has file
        var myFile = e.files[0];
        //save file to session if available
        if (myFile.size > 0) {
            if (HasLocalStorage()) {
                //local storage available
                sessionStorage.FileData = JSON.stringify(myFile.rawFile);
                sessionStorage.FileName = myFile.name;
            }
        }
    }
}
function BasicInfo(AccountId, AccountName, FileName, FileBinary) {
    this.AccountId = AccountId;
    this.AccountName = AccountName;
    this.FileName = FileName;
    this.FileBinary = FileBinary;
}
function SaveBasicInfo() {
 
    //Get Info
    var name = $("#txtName").val();
    var accountid = $("#ddlAccount").val();
    var FileName = '';
    var FileBinary = null;
 
    if (HasLocalStorage()) {
        FileName = sessionStorage.FileName;
        FileBinary = JSON.parse(sessionStorage.FileData);
 
        var myBasicInfo = new BasicInfo(accountid, name, FileName, FileBinary);
 
        $.ajax({
            url: '/api/AM/BasicInfo/' + myUserInfo.CurrentAccountId,
            type: 'put',
            data: JSON.stringify(myBasicInfo),
            contentType: 'application/json',
            success: function (data) {
                //Save was successful
            },
            error: function (err) {
                alert(err.responseText);
            },
            complete: function () {
            }
        });
    }
}

SaveBasicInfo is called when the user clicks the Save button on the form.   Here is the function on the server.  The data all comes through except the rawData from the file.  It ends up being NULL.

public string PutBasicInfo(BasicInfo myBasicInfo) {
     //Do Stuff Here
     //myBasicInfo.FileBinary IS NULL!!
}

I tried both passing in a byte[] array and a string with the data, both I can't seem to get working.  What is the proper way to pass the rawData to C# function so I can save the file to the database?

Thanks.
Dimiter Madjarov
Telerik team
 answered on 03 Nov 2014
4 answers
885 views
Looking to resize images before they get sent to the server.  I know there are flash/silverlight, etc ways to do this.  Just looking for options with the KendoUI uploader.  We basically just want to enforce a max width/height.  Any suggestions?

  Nick
Dimiter Madjarov
Telerik team
 answered on 03 Nov 2014
1 answer
69 views
Hi,

I want to know if it's possible to add png (or similar) to Y axis labels on line/bar charts.

Thank you,
Dan
Hristo Germanov
Telerik team
 answered on 03 Nov 2014
2 answers
245 views
Hi,

I want to get Total, High, Low, Avg Values from a Bar chart. My chart will display the graph based on days, weeks and months base units on the drop down selection. So the values should change with Daily, Weekly and Monthly graph Any want to draw a line through the Avg value of the Value Axis. Refer the attached image. Any help would be appreciated. 

Thanks,
Nimmy
Nimmy
Top achievements
Rank 1
 answered on 02 Nov 2014
3 answers
213 views
Hi,

 We want to have column resizing conditionally - so initially resizing should be enabled, then based on some condition, its should be disabled. Is this possible? If yes, can you please let know how.

Thanks in advance.
Dimo
Telerik team
 answered on 31 Oct 2014
2 answers
679 views
Hi,

 We want that when the grid loads, header bar should appear but column title should not display. When we tried to set as column title as '', still the field name showed up in the grid header.

 Can you please let me know how to fix this.

Thanks a lot.
Abhishek
Top achievements
Rank 1
 answered on 31 Oct 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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?