This is a migrated thread and some comments may be shown as answers.

MVVM grid: Where is the documentation for the 'data' attributes for the grid

10 Answers 205 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 06 Oct 2012, 12:21 PM
Can someone please guide me to the documentation for all the 'data' attributes supported on the grid for use in MVVM.  I have guessed at a few and saw some in samples.  I need the full list please

I am using these:
 data-role="grid" 
 data-bind="source: gridSource"
 data-columns='ProductName'
 data-sortable='true'
 data-editable='inline'

I guessed at  'data-sortable' and it worked.  I tried  'data-filterable' but it did NOT work. No filter icons appeared in the column headers.  So is filtering supported in the MVVM grid?  whats the 'data' attribute for this?

Thanks
-Jonathan

10 Answers, 1 is accepted

Sort by
0
Brian
Top achievements
Rank 1
answered on 22 Oct 2012, 07:35 PM
Bump



I would like to see the same. The MVVM documentation is definitely lacking.



Thanks,

Brian
0
FRANCOIS
Top achievements
Rank 1
answered on 03 Nov 2012, 01:35 PM
^
Bump!

Another demand for more documentation/examples.

Looks like Kendo' MVVM solution was released a bit too early...

Thanks,
Frank
0
Tom
Top achievements
Rank 1
answered on 09 Nov 2012, 02:12 AM
It is a bit tedious trying to work this stuff out isn't it? A combination of guesswork, going over samples, etc. I like the idea of using MVVM but not sure if it can do everything I want yet. For example I'm currently setting editor templates in my grid, such as 
columns: [
          { field: "Trandate", title: "Date", format:"{0:dd/MMM/yyyy}", editor:DatePickEdit},
          { field: "MerchantName", title: "Vendor", editor: MerchantSelect },
          { field: "Description", title: "Description" },
          { field: "LedgerCode", title: "Ledger Code", editor: LedgerSelect },
          { field: "GrossAmount", title: "Gross", format: "{0:C}", footerTemplate:'#=kendo.format("{0:c}", sum)#' },
          { field: "GST", title: "GST", format: "{0:C}", footerTemplate: '#=kendo.format("{0:c}", sum)#' }
],
but I have no idea if its possible to specify these attributes of columns including editor templates (which are dropdowns and auto completes) using data-attributes or some other method. It seems to me that such things definitely belong in the view not the model, though the data they use (in the case of the auto completes) should be handled in the viewmodel.

Look forward to improvements in this area.
0
Martin
Top achievements
Rank 1
answered on 09 Nov 2012, 03:14 PM
The data-columns attribute does at least some of that:
<div id="searchPane-grid" data-scrollable="false" data-editable="true" data-sortable="true" data-role="grid"
        data-columns='[
                  {"title": "Type", "field": "reportType"}
                , {"title": "Author", "field": "author"}
                , {"title": "Date", "field": "dictatedDate", "format": "{0:MM/dd/yyyy}"}
                ]'
        data-bind="source: sourceDocuments"></div>
Note the additional quote-marks, which are required.

I don't know a good way to move the column definition into JavaScript proper, which would be more natural.
0
Evan
Top achievements
Rank 1
answered on 11 Feb 2013, 08:38 AM
Agreed. Where is the documentation for the 'data-' attributes?

I cannot even find the full list of options for data-role. These things are fundamental.

A full list would be appreciated.
0
Curt Rabon
Top achievements
Rank 1
Veteran
answered on 12 Feb 2013, 03:58 AM
Same here.  Telerik, where is it???
0
Alexander Valchev
Telerik team
answered on 14 Feb 2013, 02:29 PM
Hello guys,

Data attribute initialization is explained in this help topic. Widget's data-attributes are the same as the one listed in the API reference, you just have to follow the syntax convention:

Each widget configuration option can be specified via a data attribute on the respective element. Camel-cased options are translated to dash separated attributes. For instance, dataTextField option of the autocomplete widget can be specified with data-text-field="foo" attribute.

Options, which start with data do not require an additional "data" in the attribute name, e.g. data-source="ds"

Configuration that can be specified as objects or arrays, should be transformed into valid json. As an example:
$("#grid").kendoGrid({
    dataSource: ds,
    sortable: { mode: "multiple" }
});

Is transformed into:
<div id="grid" data-role="grid" data-source="ds" data-sortable='{ "mode": "multiple" }'></div>


Best regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Alan
Top achievements
Rank 1
answered on 10 Nov 2013, 12:10 PM
Given that it is that straightforward once you know the rules, why not add it to your official documentation to save people having to search the forums. I did a search on 'data-sortable' in the docs and only got back the tutorial so I'm assuming there is still nothing official on this.
0
Mark Freedman
Top achievements
Rank 1
answered on 21 Nov 2013, 02:49 PM
Alexander and team, it's been months and there has been very little improvement, if any, to the documentation. Although the documentation is more complete than the old Telerik MVC docs (which is not saying much), they are severely lacking in a key way -- we have to jump around to a half dozen different places to put information together, including random forum responses from you and your team. I strongly recommend pausing development and focusing on complete, proper documentation. We spend way too much time trying to read the Kendo UI team's mind, and make assumptions and hunches. For a library that is supposed to make development easier, we have to waste so much time inspecting (and running CSI on) low-level functionality, that it nullifies much of the benefit of Kendo UI. Just because the Kendo UI team inherently understand the innards of the library, it is improper to assume the people who use it have the same understanding. Just take a look at these forum threads. Can't you see the common frustration throughout ("where is the documentation for this, that, and the other?")? It's bad enough when an open source project has such issues, but that comes with that territory. But for a commercial product like Kendo UI, the gymnastics we have to perform to find answers is ridiculous.

Please don't respond to this post by asking, "Well, what is it that you want an answer for?" because that would just be perpetuating the problem. Just please dedicate people to work on a complete overhaul of the documentation.

Thank you.
0
Jacques
Top achievements
Rank 2
answered on 27 Nov 2013, 03:45 PM
Documentation has always been a problem when using a Telerik product. I've brought this up on quite a few occasions, nothing changes though. 
Tags
MVVM
Asked by
Jon
Top achievements
Rank 1
Answers by
Brian
Top achievements
Rank 1
FRANCOIS
Top achievements
Rank 1
Tom
Top achievements
Rank 1
Martin
Top achievements
Rank 1
Evan
Top achievements
Rank 1
Curt Rabon
Top achievements
Rank 1
Veteran
Alexander Valchev
Telerik team
Alan
Top achievements
Rank 1
Mark Freedman
Top achievements
Rank 1
Jacques
Top achievements
Rank 2
Share this question
or