Telerik Forums
Kendo UI for jQuery Forum
2 answers
63 views
It's a list of items, the calendar is bound to a date value on the "SelectedItem"

So when selected item changes I want to show the value in the calendar.

However what's happening is that the calendar just keeps animating (rather choppy) back to may 2012 over and over with no selected dates.

This is the date value I'm binding to "2013-04-01T00:00:00"

Here's the markup
<li>Starts: <span data-role="calendar" data-bind="value: selectedBlock.data.StartDate"></span></li>

ideally i'd like no animation, and just want to visualize the dates
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 23 May 2012
1 answer
261 views
Is there is any way that I can show all my validation messages on a window (or a dialog). My client don't want the messages on the right of each input boxes?
Iliana Dyankova
Telerik team
 answered on 23 May 2012
0 answers
143 views
hi,
i am able to load the grid from the database.i have an image field in my database,i want to display image in the grid.now it is showing undefined in the image field.can u tell me how to insert an image.
and also i want to use check box,radio button,combo box and link.what is the "type" i have to give for these fields.
charan
Top achievements
Rank 1
 asked on 23 May 2012
1 answer
345 views
I have a web service that returns me results as this data structure.
public class LoadSearchingReturn
{
    [DataMember]
    public IEnumerable<Results> SearchingResults { get; set; }
    [DataMember]
    public IEnumerable<string> Errors {get;set;}
    [DataMember]
    public int TotalResults { get; set; }
}

TheSearchingResults is what displays in my grid and I use the Total Results inside my schema like:
dataSource: {
    schema: {
        data: "d.SearchingResults",
        total: function (data) {
            return data.d.TotalResults;
        }
    },

So, my question...How do i access that Errors collection and display that to the user?
Alexander Valchev
Telerik team
 answered on 23 May 2012
0 answers
224 views
I'm trying to bind and image to the background of a div but having trouble due to the need to add 'url()' to the image.  In the example below if selectedPhoto is just the path to the file "/image/somefile.jpg" then it doesn't work.  If selectedPhoto is "url('/image/somefile.jpg')" then it works.  Is there a way to add in url() in the binding around the variable selectedPhoto without having to including it in the value of the variable?

data-bind="style: { backgroundImage:  selectedPhoto  }"

I cross posted this under an older thread but wasn't sure if I would get a response.

http://www.kendoui.com/forums/framework/mvvm/problem-in-binding-style-in-template.aspx

Thanks,
Brad
Brad Sumner
Top achievements
Rank 1
 asked on 23 May 2012
2 answers
171 views
Hi,

How can I add command columns to a grid that I defined from an HTML table?

The only way I have seen to add a command column is through the example code, where the command columns are included in the column definition.

Since I am defining from an HTML table, I have not needed to define the column set in Javascript, so I am unclear how to add a command column (edit / delete) in this case.

Thanks
TK
Top achievements
Rank 1
 answered on 23 May 2012
2 answers
107 views
Hi guys,

I'm having an issue where i have a switch control (Based on a input tag with type set to checkbox) embedded in an item in a list view. 

It works perfectly everywhere I test except on android 2.3.4 devices where it does not appear at all. (I have tested on a Samsung Galaxy S II and a Sony Xperia Arc S and it does not work on either phone)

I'd like to note that it does work on these devices when it is outside of a list view (ul, li tags) but the minute I place it inside one it disappears.

I use the following code in a view:

<ul data-role="listview" data-style="inset" data-type="group">
        <li>
            Africa
            <ul>
                <li data-icon="toprated"><input name="MyCheckBox" id="MyCheckBox" type="checkbox" data-role="switch"/></li>
            </ul>
        </li>
</ul>


Thanks,

Rob
Grant
Top achievements
Rank 1
 answered on 23 May 2012
1 answer
118 views
I'm using MVVM and I want to use a window to display content when a button is clicked in a grid. The content is empty in the window. If I don't use a window then my fields are populated. Is there a way around this?


$("#contactsGrid").delegate(".details-button", "click", function (e) {
        e.preventDefault();
        //debugger;
        contactViewModel.set("selectedContact", $("#contactsGrid").data("kendoGrid").dataItem($(this).closest("tr")));

        wnd.center().open(); // this wipes the newly selected contact details
    });
Iliana Dyankova
Telerik team
 answered on 23 May 2012
2 answers
107 views

New documentation portal feature requests....

MVVM:

  1.  Popup edit window: Ability to click a button and have that dataitem popup in an edit window to change the properties…and save them back.  Difficulty: no grid.
  2. Complex remote binding: events\changes auto-save to a webservice instead of a “Save” button after many changes.  So I can’t image if you add an item to an array you’d send the entire array back to the service to merge\delete\insert the changes?  How does one keep the model synced to the remote data safely.
  3. Refreshing an array and\or the entire model with $.ajax response data.
  4. Sorting arrays
  5. Subscribing to change events on observables
  6. Binding to functions…like Knockout computed observables?...I don’t know when this works, doesn’t work…HOW it works, etc etc.  Like I have a template bound to parent().parent().functionName seems okay, but then in a fiddle if I try and bind to a function and change the data, it doesn’t update.  Need more insight into the framework.
  7. Nested template binding (with interaction)
  8. Complex interaction

 So I do know the answers to some of these, I just would like docs\samples on these scenarios…I’m trying to move a couple people onto MVVM, but the current docs are pretty bad (please, no offense intended).

 ------------

UNRELATED (the best kind of related):

Feature request: KnockoutJS has the mapping plugin to plug remote data into the model…right now we have to do an $.each loop…

//Lame
for (var field in jsonData) {
        viewModel.set(field, jsonData[field]);
    }

I was hoping we could get something like 

//Awesome
viewModel.load(jsonData)

and it’d handle it internally….or load\refresh whatever…

 ------------

Wishlist: Each doc sample contains a fiddle to play with\fork so we can help flesh out demos\samples…

sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 23 May 2012
5 answers
306 views
I need a checkbox bound to a bool in my model...however on click I need to persist that change to a webservice.

data-bind="checked: AvailableToHamilton, click: shareWith"

So in this case I need the checkbox to show the state of the model, then the click event I need to send the value and then call a function to update a count based on the model.

What's HAPPENING though it seems is this
1) Checked
2) Ajax Call
3) Ajax Complete
4) Function Runs to get count (checks bool state)
5) Bool state changed

So I know this because if I set a timeout on step 4
success: function (e) {
    setTimeout(function(){
        viewModel.getTotalCapacity();
    }, 100);
}

...then the count updates okay...

So if I could subscribe to a change on the property (somehow) then the function could run AFTER it changes.

Steve
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 23 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?