Telerik Forums
Kendo UI for jQuery Forum
1 answer
315 views
This is from your "Getting started" page:
<!-- View -->
<div id="view">
<!-- The value of the INPUT element is bound to the "firstName" field of the View-Model.
When the value changes so will the "firstName" field and vice versa. -->
<label>First Name:<input data-bind="value: firstName" /></label>
<!-- The value of the INPUT element is bound to the "lastName" field of the View-Model.
When the value changes so will the "lastName" field and vice versa. -->
<label>Last Name:<input data-bind="value: lastName" /></label>
<!-- The click event of the BUTTON element is bound to the "displayGreeting" method of the View-Model.
When the user clicks the button the "displayGreeting" method will be invoked. -->
<button data-bind="click: displayGreeting">Display Greeting</button>
</div>
<script>
// View-Model
var viewModel = {
firstName: "John",
lastName: "Doe",
displayGreeting: function() {
// Get the current values of "firstName" and "lastName"
var firstName = this.get("firstName");
var lastName = this.get("lastName");
 
alert("Hello, " + firstName + " " + lastName + "!!!");
}
};
// Bind the View to the View-Model
kendo.bind($("#view"), viewModel);
</script>

You can actually condense these lines:
// Get the current values of "firstName" and "lastName"
          var firstName = this.get("firstName");
          var lastName = this.get("lastName");
 
          alert("Hello, " + firstName + " " + lastName + "!!!");

into a single line which uses the properties directly instead of calling "get()" and assigning it to a local variable, first.  In other words, this works:
alert("Hello, " + this.firstName + " " + this.lastName + "!!!");

That makes a lot of sense because we should be able to directly use the local properties.  However, this does not work if you wanted to clear the input:
this.firstName = '';

You have to use this, instead:
this.set("firstName", '');

which seems strange.  So, my questions are:

1)  Is there a reason why you didn't directly use the properties (e.g. "this.firstName" instead of "var firstName = this.get('firstName');") in the demo?  Is there a downside to doing it that way?
2)  Is the fact that we can't "set" local properties directly (as we can "get" them) a bug/oversight?

Thanks.
Michael
Top achievements
Rank 1
 answered on 12 Jul 2012
7 answers
638 views
I have a kendo grid that is attached to a datasource. Users are able to apply filters on the grid and I'm wondering if there is a way to extract the data after the filters are applied?

The reason for this is that I can then send the filtered data to the server and export to csv/excel. Currently my export works, but doesn't take into account any filters. It exports all the data from the grid.

Thanks!
Hattan Shobokshi
Top achievements
Rank 1
 answered on 12 Jul 2012
0 answers
98 views
HI,
    When I bind gird to a remote datasource,should I return all the data at server? actually,I just want to show one page,how should I do that,and,where can I define the total record count or total page? Waiting for your answer,3Q :)
Tian
Top achievements
Rank 1
 asked on 12 Jul 2012
1 answer
166 views
Hi,

Is there a way to obtain the dataSource object that is bound to the details grid in a hierarchical grid. I have editable columns in the details grid and need to add rows to the details grid at runtime.

Regards,
Sarvesh
Petur Subev
Telerik team
 answered on 12 Jul 2012
1 answer
147 views
I made a few posts in these Kendo UI forums and I apperantly received some points from the admins. What do these points do, and how can I redeem them?
Dimo
Telerik team
 answered on 12 Jul 2012
4 answers
817 views
When the grid is initilalised, and waiting for its first data set to be returned from the remote datasource, the loading indicator doesn't show, which makes it unclear to the user that data is being loaded...

Is this a bug, or is there a way I can change this behaviour?

It works perfectly fine when going to another page; then we have a nice loading indicator when data is being fetched...
Gary
Top achievements
Rank 1
 answered on 12 Jul 2012
2 answers
197 views
Hi, I question whether pageable parameter: {pageSizes: true} it is possible to give individual values? Currently there are 5, 10, 20, and I need 25, 50, 100. I searched the documentation, but for now there is no information about this parameter.

Regards/Pozdrawiam,
Paweł Kasztelan
Paweł
Top achievements
Rank 2
 answered on 12 Jul 2012
1 answer
175 views
Hi
I have a ListView in a tabstrip with a button like the Sushi Demo and i want that when i click on the button the application open the detail view in the same view.
How can i do this?
thanks Elios 
d2uX
Top achievements
Rank 1
 answered on 12 Jul 2012
1 answer
179 views
Is there no easy way to pop an item from an array?

Take this code for example"

<div id="kendo-bound-resourcelist" data-bind="visible: isVisible" >
                    <div data-role="grid" data-sortable="true" data-bind="source: items" data-columns='["Title", "PMID", "TypeOfMaterial",""]' data-row-template="row-template"></div>
                </div>
 
                <script id="row-template" type="text/x-kendo-template">
                      <tr class="k-grid-edit-row">
                          <td>
                            <span data-bind="text: Title"></span>
                          </td>
                          <td>
                            <span data-bind="text: PMID"></span>
                          </td>
                          <td>
                            <span data-bind="text: TypeOfMaterial[0]"></span>
                          </td>
                          <td>
                            <input type="button" data-bind="click: deleteItem" value="Delete" />
                          </td>
                      </tr>
                </script>

Ok so on click we call the delete in the model
this._viewModel = kendo.observable({
                items: [],
                isVisible: function () {
                    return this.get("items").length > 0 ? true : false;
                },
                deleteItem: function (resource) {
                    this.get("items").pop(resource);
                }
            });

So why doesn't this work? :/  It's just popping off the last item in the array instead of the item I'm giving it. 

I've tried doing things like this, but end up at the same result
var deletedId = resource.data.Id;
var items = this.get("items");
 
for (var i = 0; i < items.length; i++) {
    if (items[i].Id === deletedId) {
        this.get("items").pop(items[i]);
    }
}

What am I doing wrong?
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 12 Jul 2012
1 answer
71 views
Hi everyone,
 I am new to Kendo Ui and was wondering where the best place to start would be???
_______________________________________________________________________
Thanks,
Cory Carter
CPA Freedom Review
Dimo
Telerik team
 answered on 12 Jul 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
DropDownTree
ListBox
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
LLM Kit
+? 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?