Telerik Forums
Kendo UI for jQuery Forum
2 answers
195 views
Anybody experienced this using Kendo UI Editor?

When typing a lot of text without a newline (Enter-button) everything saves just fine, but if anybody press the enterbutton to make the text more readable, the data just does not get saved. Being newbie on both mvc and kendo, I really need help getting past this problem..

Using OpenAccess ORM.

Thanks in advance.
public partial class Exercises
{
private string _note;
public virtual string Note
{
get { return this._note; }
set { this._note = value; }
}
}
Exercise.Note = drill.Comments;
DB.SaveChanges();
<div class="editor-label">
    @Html.LabelFor(m=>m.Comments)
</div>
<div class="editor-field">
    @Html.EditorFor(m=>m.Comments)
    @Html.ValidationMessageFor(m=>m.Comments)
</div>
[Display(Name = "Comments", ResourceType = typeof(DisplayNameStrings)), UIHint("Editor")]
        public string Comments { get; set; }
Terje
Top achievements
Rank 1
 answered on 10 Jul 2013
1 answer
89 views
Dear Sirs,

My question has to do with the sample referenced below.
http://demos.kendoui.com/web/mvvm/source.html
In that example an observable array is created with the following code:
products: [
{ name: "Hampton Sofa", price: 989.99, unitsInStock: 39 },
{ name: "Perry Sofa", price: 559.99, unitsInStock: 17 },
{ name: "Donovan Sofa", price: 719.99, unitsInStock: 29 },
{ name: "Markus Sofa", price: 839.99, unitsInStock: 3 }
]
I have been working on a similar example where I create a template and then bound the template to
an observable object using data that I created similar to the above.  That code worked fine.  When I
tried to create the data from a remote data source using a kendo data source the binding failed. I have looked at the demo where you bind a drop down list to a remote data source
http://demos.kendoui.com/web/mvvm/remote-binding.html
Questions:
1.  Is there an example of how to take  a source and template and bind it to an observable using data from a data source?
2.  How do you create an observable array from a data source?

Scott



Scott
Top achievements
Rank 1
 answered on 09 Jul 2013
1 answer
81 views
I am trying to write simple bar chart. Here is my controller

var test = new List<DataCenterSpaceViewModel>{new DataCenterSpaceViewModel { DataCenterName  =  "t1", AvailableSpace = 1, ConfiguredSpace = 3, ConsumedSpace = 2 },
new DataCenterSpaceViewModel { DataCenterName = "t2", AvailableSpace = 4, ConfiguredSpace = 5, ConsumedSpace = 2 }
};
 
return PartialView(test);


Here is my view


<div class="chart-wrapper">
@(Html.Kendo().Chart<SAN.ViewModel.DataCenterSpaceViewModel>()
.Name("DataCenterSpace")
.Title("DataCenter Space")
.Legend(legend => legend.Visible(false))
.DataSource(dataSource => dataSource
.Read(read => read.Action("DataCenterSpace", "Home") )
)
.Series(series =>
{

series.Bar(e => e.ConfiguredSpace).Name("Configured Space");
series.Bar(e => e.ConsumedSpace).Name("Consumed Space");
series.Bar(e => e.AvailableSpace).Name("Available Space");
}
)
.CategoryAxis(axis => axis
.Categories(e=>e.DataCenterName)
.MajorGridLines(lines => lines.Visible(false))
)
.ValueAxis(axis => axis
.Numeric()
.Max(10)
.Line(line => line.Visible(false))
.MajorGridLines(lines => lines.Visible(true))
)

.Tooltip(tooltip => tooltip
.Visible(true)
.Template("#= series.name #: #= value #")
)
)
</div>


I attached the result
Sharif
Top achievements
Rank 1
 answered on 09 Jul 2013
1 answer
112 views
After spending entire morning trying to get some data to be data displayed in Kendo grid I am getting pretty annoyed.
With this html (generated by Kendo MVC wrapper):

<div class="k-widget k-grid" id="grid_AitTodaySectionEntity"><table><colgroup><col /><col /><col /><col /><col /><col /><col /></colgroup><thead class="k-grid-header"><tr><th class="k-header k-filterable" data-field="Caption" data-title="Caption" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=Caption-asc">Caption</a></th><th class="k-header k-filterable" data-field="DefaultRows" data-title="Default Rows" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=DefaultRows-asc">Default Rows</a></th><th class="k-header k-filterable" data-field="Id" data-title="Id" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=Id-asc">Id</a></th><th class="k-header k-filterable" data-field="ModuleId" data-title="Module Id" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=ModuleId-asc">Module Id</a></th><th class="k-header k-filterable" data-field="TodaySection" data-title="Today Section" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=TodaySection-asc">Today Section</a></th><th class="k-header k-filterable" data-field="IsNew" data-title="Is New" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=IsNew-asc">Is New</a></th><th class="k-header k-filterable" data-field="IsDirty" data-title="Is Dirty" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&grid_AitTodaySectionEntity-sort=IsDirty-asc">Is Dirty</a></th></tr></thead><tbody><tr class="t-no-data"><td colspan="7"></td></tr></tbody></table><div class="k-pager-wrap k-grid-pager"><a class="k-link k-state-disabled" data-page="1" href="#" title="Go to the first page"><span class="k-icon k-i-seek-w">seek-w</span></a><a class="k-link k-state-disabled" data-page="0" href="#" title="Go to the previous page"><span class="k-icon k-i-arrow-w">arrow-w</span></a><ul class="k-pager-numbers k-reset"><li><span class="k-state-selected" data-page="1">1</span></li></ul><a class="k-link k-state-disabled" data-page="2" href="#" title="Go to the next page"><span class="k-icon k-i-arrow-e">arrow-e</span></a><a class="k-link k-state-disabled" data-page="1" href="#" title="Go to the last page"><span class="k-icon k-i-seek-e">seek-e</span></a><span class="k-pager-info k-label">No items to display</span></div></div><script>
    jQuery(function(){jQuery("#grid_AitTodaySectionEntity").kendoGrid({"columns":[{"title":"Caption","field":"Caption","filterable":{},"encoded":true},{"title":"Default Rows","field":"DefaultRows","filterable":{},"encoded":true},{"title":"Id","field":"Id","filterable":{},"encoded":true},{"title":"Module Id","field":"ModuleId","filterable":{},"encoded":true},{"title":"Today Section","field":"TodaySection","filterable":{},"encoded":true},{"title":"Is New","field":"IsNew","filterable":{},"encoded":true},{"title":"Is Dirty","field":"IsDirty","filterable":{},"encoded":true}],"pageable":{"buttonCount":10},"sortable":true,"filterable":true,"scrollable":false,"dataSource":{"transport":{"prefix":"","read":{"url":"/Grid/Get?Type=AitTodaySectionEntity"}},"pageSize":10,"page":1,"total":0,"serverPaging":true,"serverSorting":true,"serverFiltering":true,"serverGrouping":true,"serverAggregates":true,"type":"aspnetmvc-ajax","filter":[],"schema":{"data":"Data","total":"Total","errors":"Errors","model":{"fields":{"Caption":{"type":"string"},"DefaultRows":{"type":"number","defaultValue":null},"Id":{"type":"number"},"ModuleId":{"type":"number"},"TodaySection":{"type":"string"},"ModModule":{"type":"object"},"Fields":{"type":"object"},"IsNew":{"type":"boolean"},"IsDirty":{"type":"boolean"},"ActiveContext":{"type":"object"},"ConcurrencyPredicateFactoryToUse":{"type":"object"},"AuthorizerToUse":{"type":"object"},"AuditorToUse":{"type":"object"},"Validator":{"type":"object"}}}}}});});
</script>

And the result of the call to the controller:
{
  "$id": "1",
  "Data": [
    {
      "$id": "2",
      "Caption": "Calendar",
      "DefaultRows": 5,
      "Id": 1,
      "ModuleId": 9,
      "TodaySection": "CALENDER"
    },
    {
      "$id": "3",
      "Caption": "Repairs",
      "DefaultRows": 999,
      "Id": 2,
      "ModuleId": 2,
      "TodaySection": "EXP_REPAIRS"
    },
    {
      "$id": "4",
      "Caption": "Maintenance",
      "DefaultRows": 999,
      "Id": 3,
      "ModuleId": 2,
      "TodaySection": "EXP_MAINTENANCE"
    },
    {
      "$id": "5",
      "Caption": "CPI",
      "DefaultRows": 999,
      "Id": 4,
      "ModuleId": 3,
      "TodaySection": "TODAY.CIP"
    },
    {
      "$id": "6",
      "Caption": "Notifications",
      "DefaultRows": 999,
      "Id": 5,
      "ModuleId": 1,
      "TodaySection": "EXP_NOTIFICATIONS"
    },
    {
      "$id": "7",
      "Caption": "Tasks",
      "DefaultRows": 999,
      "Id": 6,
      "ModuleId": 4,
      "TodaySection": "EXP_TASKS"
    },
    {
      "$id": "8",
      "Caption": "Support cases",
      "DefaultRows": 999,
      "Id": 7,
      "ModuleId": 5,
      "TodaySection": "EXP_SUPPORT"
    },
    {
      "$id": "9",
      "Caption": "Call ToDo",
      "DefaultRows": 999,
      "Id": 8,
      "ModuleId": 12,
      "TodaySection": "CALL_TODO"
    },
    {
      "$id": "10",
      "Caption": "My VoiceMail Messages",
      "DefaultRows": 999,
      "Id": 9,
      "ModuleId": 12,
      "TodaySection": "MY_VOICEMAIL"
    },
    {
      "$id": "11",
      "Caption": "Today Call-Log",
      "DefaultRows": 999,
      "Id": 10,
      "ModuleId": 12,
      "TodaySection": "TODAY_CALL_LOG"
    },
    {
      "$id": "12",
      "Caption": "My Discussions",
      "DefaultRows": 999,
      "Id": 11,
      "ModuleId": 15,
      "TodaySection": "TODAY_MY_DISCUSSION"
    },
    {
      "$id": "13",
      "Caption": "Legal Control appointments",
      "DefaultRows": 20,
      "Id": 12,
      "ModuleId": 19,
      "TodaySection": "LC_APPOINTMENTS"
    },
    {
      "$id": "14",
      "Caption": "Repairs2",
      "DefaultRows": 999,
      "Id": 13,
      "ModuleId": 20,
      "TodaySection": "EXP_REPAIRS2"
    },
    {
      "$id": "15",
      "Caption": "Maintenance2",
      "DefaultRows": 999,
      "Id": 14,
      "ModuleId": 20,
      "TodaySection": "EXP_MAINTENANCE2"
    },
    {
      "$id": "16",
      "Caption": "CPI2",
      "DefaultRows": 999,
      "Id": 15,
      "ModuleId": 22,
      "TodaySection": "TODAY.CIP2"
    },
    {
      "$id": "17",
      "Caption": "Overdue Maintenances2",
      "DefaultRows": 999,
      "Id": 16,
      "ModuleId": 20,
      "TodaySection": "EXP_MAIN_OVER2"
    },
    {
      "$id": "18",
      "Caption": "Top CIPs",
      "DefaultRows": 50,
      "Id": 17,
      "ModuleId": 22,
      "TodaySection": "TODAY.CIP.TOP"
    },
    {
      "$id": "19",
      "Caption": "Measures",
      "DefaultRows": 999,
      "Id": 18,
      "ModuleId": 23,
      "TodaySection": "TODAY.MEASURES"
    },
    {
      "$id": "20",
      "Caption": "Under min. stock",
      "DefaultRows": 999,
      "Id": 19,
      "ModuleId": 8,
      "TodaySection": "TODAY.STOCK_UNDER_MINIMUM"
    }
  ],
  "Total": 19,
  "AggregateResults": null,
  "Errors": null
}
I don't get anything. 
The controller does get called and the content is transfered (see atached image). But nothing is showing up.
I have no idea how to determine what could be wrong!!!!

Here is the controller method:

Function [Get](type As String, <Kendo.Mvc.UI.DataSourceRequest()> request As DataSourceRequest) As ActionResult
    Dim result As Object
    Using daa As New DataAccessAdapter(ConfigurationManager.AppSettings("ConnectionString"))
        Dim linq As New LinqMetaData(daa)
        Dim assets As IQueryable(Of AitTodaySectionEntity) = linq.AitTodaySection
        result = assets.ToDataSourceResult(request)
    End Using
    Dim json As New JsonNetResult
    json.Data = result
    Return json
End Function

<div class="k-widget k-grid" id="grid_AitTodaySectionEntity"><table><colgroup><col /><col /><col /><col /><col /><col /><col /></colgroup><thead class="k-grid-header"><tr><th class="k-header k-filterable" data-field="Caption" data-title="Caption" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&amp;grid_AitTodaySectionEntity-sort=Caption-asc">Caption</a></th><th class="k-header k-filterable" data-field="DefaultRows" data-title="Default Rows" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&amp;grid_AitTodaySectionEntity-sort=DefaultRows-asc">Default Rows</a></th><th class="k-header k-filterable" data-field="Id" data-title="Id" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&amp;grid_AitTodaySectionEntity-sort=Id-asc">Id</a></th><th class="k-header k-filterable" data-field="ModuleId" data-title="Module Id" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&amp;grid_AitTodaySectionEntity-sort=ModuleId-asc">Module Id</a></th><th class="k-header k-filterable" data-field="TodaySection" data-title="Today Section" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&amp;grid_AitTodaySectionEntity-sort=TodaySection-asc">Today Section</a></th><th class="k-header k-filterable" data-field="IsNew" data-title="Is New" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&amp;grid_AitTodaySectionEntity-sort=IsNew-asc">Is New</a></th><th class="k-header k-filterable" data-field="IsDirty" data-title="Is Dirty" scope="col"><a class="k-grid-filter"><span class="k-icon k-filter"></span></a><a class="k-link" href="/Grid/Get?Type=AitTodaySectionEntity&amp;grid_AitTodaySectionEntity-sort=IsDirty-asc">Is Dirty</a></th></tr></thead><tbody><tr class="t-no-data"><td colspan="7"></td></tr></tbody></table><div class="k-pager-wrap k-grid-pager"><a class="k-link k-state-disabled" data-page="1" href="#" title="Go to the first page"><span class="k-icon k-i-seek-w">seek-w</span></a><a class="k-link k-state-disabled" data-page="0" href="#" title="Go to the previous page"><span class="k-icon k-i-arrow-w">arrow-w</span></a><ul class="k-pager-numbers k-reset"><li><span class="k-state-selected" data-page="1">1</span></li></ul><a class="k-link k-state-disabled" data-page="2" href="#" title="Go to the next page"><span class="k-icon k-i-arrow-e">arrow-e</span></a><a class="k-link k-state-disabled" data-page="1" href="#" title="Go to the last page"><span class="k-icon k-i-seek-e">seek-e</span></a><span class="k-pager-info k-label">No items to display</span></div></div><script>
jQuery(function(){jQuery("#grid_AitTodaySectionEntity").kendoGrid({"columns":[{"title":"Caption","field":"Caption","filterable":{},"encoded":true},{"title":"Default Rows","field":"DefaultRows","filterable":{},"encoded":true},{"title":"Id","field":"Id","filterable":{},"encoded":true},{"title":"Module Id","field":"ModuleId","filterable":{},"encoded":true},{"title":"Today Section","field":"TodaySection","filterable":{},"encoded":true},{"title":"Is New","field":"IsNew","filterable":{},"encoded":true},{"title":"Is Dirty","field":"IsDirty","filterable":{},"encoded":true}],"pageable":{"buttonCount":10},"sortable":true,"filterable":true,"scrollable":false,"dataSource":{"transport":{"prefix":"","read":{"url":"/Grid/Get?Type=AitTodaySectionEntity"}},"pageSize":10,"page":1,"total":0,"serverPaging":true,"serverSorting":true,"serverFiltering":true,"serverGrouping":true,"serverAggregates":true,"type":"aspnetmvc-ajax","filter":[],"schema":{"data":"Data","total":"Total","errors":"Errors","model":{"fields":{"Caption":{"type":"string"},"DefaultRows":{"type":"number","defaultValue":null},"Id":{"type":"number"},"ModuleId":{"type":"number"},"TodaySection":{"type":"string"},"ModModule":{"type":"object"},"Fields":{"type":"object"},"IsNew":{"type":"boolean"},"IsDirty":{"type":"boolean"},"ActiveContext":{"type":"object"},"ConcurrencyPredicateFactoryToUse":{"type":"object"},"AuthorizerToUse":{"type":"object"},"AuditorToUse":{"type":"object"},"Validator":{"type":"object"}}}}}});});
</script>
Dalibor
Top achievements
Rank 1
 answered on 09 Jul 2013
1 answer
169 views
I have a grid configured for ajax in kendo ui for mvc using the razor view engine. To be brief, the master grid datasource is an object of type ParentWidget which has a list of ChildWidgets. ChildWidget objects also have a list of ChildWidgets. These are displayed as detail rows via another grid configured in a kendo template. This template has detail rows that reference itself. This works fairly well (0...n detail row depth).

However, if a ChildWidget detail row has no children, I want to display some data contained therein as a link. The ChildWidget contains a boolean value of HasChildren which can be used to determine this. How to I test this value using ClientTemplate()?

The problem I have is that ParentWidget and ChildWidget have an ID field. In the template grid for the detail rows, "#=ID# actually refers to the parent row ID, not the ID of the *Widget that is being bound. I hope this makes sense. The code is below:

public class ParentWidget
{
    public int ID { get; set; }
    public int Name { get; set; }
    //... other properties
    public List<ChildWidget> ChildWidgets
}

public class ChildWidget : ParentWidget
{
    public int Parent_ID { get; set; }
    //... other properties
}

<div
class="float-left" style="width:100%; margin-top:4px;">
@(Html.Kendo().Grid(Model.ParentWidgets).Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.ID).Width(48).Title("Parent ID");
        columns.Bound(p => p.Name);
    })
    .ClientDetailTemplateId("subrow")
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("HierarchyBinding_Widgets", "Widget", new { parentId = "#=ID#", someParameter = Model.SomeParameter }))
     )
     .Events(events=>events.DataBound("dataBound"))
     .ToClientTemplate()
    )
</div>
 
 
<script id="subrow" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<WebUI.Models.Widget>().Name("grid_#=ID#")// <--parent row ID, thus #=HasChildren# would actually be for the parent?
    .Columns(columns =>
    {
        columns.Bound(p => p.Parent_ID).Width(48).Title("Parent ID");
        columns.Bound(p => p.ID).Width(48).Title("ID");
        columns.Bound(p => p.Name).ClientTemplate("what goes here?"); //Name should be a link if *this* Widget.HasChildren is false
    })
    .ClientDetailTemplateId("subrow")
    .DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("HierarchyBinding_Widgets", "Widget", new { parentId = "#=ID#", someParameter = (Int32.Parse(Model.SomeParameter)) }))
     )
     .Events(events=>events.DataBound("dataBound"))
     .ToClientTemplate()
    )
</script>






Shane
Top achievements
Rank 1
 answered on 09 Jul 2013
3 answers
102 views
Hi

My fundamental understanding was that series data should line up with categories. This chart renders to that logic:
function createChart() {
               $("#chart").kendoChart({
                   title: {
                       text: "Units sold"
                   },
                   seriesDefaults: {
                       width: 2,
                       markers: {
                           visible: false,
                       },
                       overlay: {
                           gradient: null
                       }
                   },
                   series: [{
                       type: "area",
                       transitions: false,
                       width: 2,
                       data: [
                           150, 200, 50
                       ]
                   }],
                   valueAxis: {
                       labels: {
                           visible: true
                       },
                       line: {
                           visible: false
                       }
                   },
                   categoryAxis: {
                       categories: [
                           new Date("2012/02/01 00:00:00"),
                           new Date("2012/02/10 00:00:00"),
                           new Date("2012/02/20 00:00:00")
                       ],
                       baseUnitStep: "auto",
                       autoBaseUnitSteps: {
                           days: [1]
                       }
                   }
               });
 
           }
But:
The dates aren't aligned to series?

And, if you change this date:
new Date("2012/02/10 00:00:00") TO new Date("2012/02/02 00:00:00"),

The chart renders 200 as the value for 2012/02/01?

Just wondering if I could get a bit of an explanation for what I'm seeing.

Thanks
Kieren
Iliana Dyankova
Telerik team
 answered on 09 Jul 2013
4 answers
216 views
I am creating a single page MDI type application where the user can create tabs for each document they are working on.   

If the tab names are too long or they select enough items to work on that the tabs no longer fit on the screen, I need a way to gracefully handle the overflow.    I do not want a second or third line to open up, rather, I would like to have an icon show up that will give them a drop down menu with the list of tabs off the screen. 

Does anyone know how this could be implemented with kendoTabStrip?

Elliot
Top achievements
Rank 1
 answered on 09 Jul 2013
1 answer
646 views
So here is  a copy of the current Grid code.  It was working fine - and suddenly noticed that it simply stopped firing.  FireBug doesn't show anything happening at all.

// Make Grid Appear
        generateGrid();
        
    // Function to actually build the grid
        
        function generateGrid() {
            $("#teamGrid").kendoGrid({
                columns: [
                    {    title: "First Name",
                        field: "users_first_name",
                        attributes: {
                            style: "text-align: center; font-size: 14px;"
                        },
                        filterable: true,
                        headerAttributes: {
                            style: "font-weight: bold; font-size: 14px; width: 100px;"
                        }
                    },
                    {    title: "Last Name",
                        field: "users_last_name",
                        attributes: {
                            style: "text-align: center; font-size: 14px;"
                        },
                        filterable: true,
                        headerAttributes: {
                            style: "font-weight: bold; font-size: 14px; width: 100px;"
                        }
                    },
                    {    title: "Email",
                        field: "users_email",
                        attributes: {
                            style: "text-align: center; font-size: 14px;"
                        },
                        filterable: { extra: false },
                        headerAttributes: {
                            style: "font-weight: bold; font-size: 14px; width: 300px;"
                        }
                    },
                    {    title: "User Type",
                        field: "admin_status",
                        attributes: {
                            style: "text-align: center; font-size: 14px;"
                        },
                        filterable: true,
                        headerAttributes: {
                            style: "font-weight: bold; font-size: 14px; width: 80px;"
                        },
                        template: function(dataItem) {
                            if ( dataItem.admin_status == 0 ) {
                                return "Team Member";
                            } else if ( dataItem.admin_status == 1 ) {
                                return "Admin";
                            } else if ( dataItem.admin_status == 2 ) {
                                return "Manager";    
                            } else if ( dataItem.admin_status == 3 ) {
                                return "Acct Owner";    
                            }
                        }
                    },
                    {
                        command: [
                            
                            {    
                                name: "destroy", text: "Delete"
                            }
                        ],
                        headerAttributes: {
                            style: "width: 120px;"
                        },
                        attributes: {
                            style: "text-align: center;"
                        },
                        title: "&nbsp;"
                    }
                    ],
                dataSource: {
                    transport: {
                        read: {
                            url: "/data/get_team.php"
                        },
                        update: {
                            url: "/data/update_teammate.php",
                            type: "POST"
                        },
                        destroy: {
                            url: "/data/delete_teammember.php",
                            type: "POST"
                        },
                        create:  {
                            url: "",
                            type: "POST"    
                        }
                    },
                    schema: {
                        data: "data",
                        total: function (result) {
                                 result = result.data || result;
                                 return result.length;
                       },
                       model: {
                            id: "users_id"   
                       }
                    },
                    type: "json"
                },
                pageable: {
                        refresh: true,
                        pageSize: 15,
                        pageSizes: [
                            15
                        ]
                    },
                sortable: true,
                filterable: true,
                autoSync: true,
                scrollable: false,
                selectable: "row",
                reorderable: false,
                toolbar: [
                            { template: kendo.template($("#template").html()) }
                         ]

            }); // END: teamGrid
            
        } // END: generateGrid function


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

Any suggestions?

Thanks, in advance...
Daniel
Telerik team
 answered on 09 Jul 2013
3 answers
731 views
This one is driving me nuts. I have a form inside of my mobile application such as this:

<form data-bind="event: { submit: submitJbSearch }">
        <ul data-role="listview">
            <li>
                <label>Job
                    <input type="text" placeholder="Job Number" data-bind="value: test" />
                </label>
            </li>
            <li>
                <label>Status
                    <select data-bind="options: statuses">
                    </select>
                </label>
            </li>
            <li>
                <label>Customer
                    <input type="text" placeholder="Customer" />
                </label>
            </li>
            <li>
                <label>PO#
                    <input type="text" placeholder="PO#" />
                </label>
            </li>
        </ul>
    </form>

I'm using the knockout data binding of submit here (also tried the events Kendo binding and the event and submit knockout binding) and the function that I'm bound to is not firing when hitting the enter key inside of Chrome or on my iPhone when hitting the 'Go' button on the keyboard.

I also added a button to the bottom of the form for a sanity check to ensure my knockout VM function was firing. Here is the button code:

<a href="#" data-bind="click: submitJbSearch" data-role="button">Submit</a>

And my VM:

define('app/vm.jobboss',
['jquery', 'ko', 'app/config'],
function ($, ko, config) {
var 
statuses = ko.observableArray(config.jobbossJobStatuses),
test = ko.observable('Test Value'),

// Methods
submitJbSearch = function() {
alert(test());
};

return {
statuses: statuses,
test: test,
submitJbSearch: submitJbSearch
};
});

I feel as if I'm going insane. I have a feeling that this is something dumb I'm missing. 

I apologize for the bad formatting, but the forums kept saying "Invalid post content" when I was trying to post code blocks.
Alexander Valchev
Telerik team
 answered on 09 Jul 2013
14 answers
234 views
Hi,
can I make the grid auto save after user clicks and confirms a destroy?

And I wonder if there are keyboard shortcuts for going to next column (tab doesnt work for me) and also for save? 

Thanks
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 09 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?