Telerik Forums
Kendo UI for jQuery Forum
9 answers
159 views
We have a SplitView in our web app, that has two panes (menu on the left, content on the right).  We want to be able to direct-link to a specific view, like we do for the phone version of our web app.  For example:

http://www.ourwebsite.com/index.html#remote-view-name

This works when we don't use a splitview (like our phone app), and Kendo will automatically load the #remote-view-name and display it in the context of our application.  But, with a splitview it doesn't work the same.  It still loads the #remote-view-name and displays it in the application, but it completely ignores our splitview code and displays only that view (no left menu pane).  Since the splitview isn't loaded, much of the rest of the site is broken.

I'm assuming that Kendo just doesn't know which pane to display the #remote-view-name in, it makes no assumptions, and just displays the view only outside of a splitview?  Is there some way to do one of these direct links and tell it which pane to display the view in?  like "/index.html#remote-view-name?target=contentPane" ?
Kiril Nikolov
Telerik team
 answered on 11 Dec 2013
2 answers
281 views
I had been trying a lot to get adding filter in ajax (razor view)

Please someone helps me ... i am new and so much need your helps
Thank you so much...

i tried this one.

 $.ajax({
             contentType: "json",
             url: url,
             method: 'GET',
             success: function (d) {
                 // var dropdownpropertyvalue = $("#dropdownproperty").val(selectedIndex);
                 var grid = $("#GridProperty").data("kendoGrid");
                // grid.autoBind(false);
                 //grid.ajax();
                 grid.dataSource = new kendo.data.DataSource({ data: d });
                // grid.filter(filter.add({field: "EntityName", operator: "Contains", value: entityName}));
                 grid.dataSource.read();
                
                // grid.serverFiltering(true);
                 grid.dataSource.filter({ field: "EntityName", operator: "eq", value: dropdownpropertyvalue });
                 grid.refresh();
             }

         });
     }
(not working here    grid.dataSource.filter({ field: "EntityName", operator: "eq", value: dropdownpropertyvalue });)


In kendo, i can do like this for filter....

.DataSource(dataSource => dataSource
          .Ajax()
          .Batch(true)
          .ServerOperation(false)
          .Filter(filter => {
              filter.Add(p => p.EntityName).Contains(@ViewData["FirstEntity"].ToString());

          })
          .Model(x =>
          {
              x.Id(y => y.Id);
              x.Field(y => y.EntityName).Editable(false);
              x.Field(y => y.PropertyName).Editable(false);
              x.Field(y => y.Description).Editable(false);

          })
          .Read(read => read.Action("PropertiesRead", "Properties",new {toolId=1}))
          .Update(update => update.Action("OperationsUpdate", "Operations",new {toolId=1}))

and how to apply here tooId = (from js variable)?

Daniel
Telerik team
 answered on 11 Dec 2013
1 answer
82 views
I want to use checkbox, because it indicates that "you can click me",  customer is easy to use.
T. Tsonev
Telerik team
 answered on 11 Dec 2013
3 answers
726 views
I have tooltip to my asp.net mvc kendo application - i followed some of the sample code shown in the kendo ui demos.  The tool tip will display and show the content correctly but no matter what I do the tooltip alway has a transparent background.  Even if i use the content template and set the background color of a DIV to a solid color it still shows up transparent.  I've had no trouble with the Kendo PanelBar or Menu - just the tooltip.  Here is my markup:

<div class="float-right">
@*<nav>*@
<ul id="menu">
                 
<li><a href="#" id="Welcome" title="">Welcome @Html.DisplayFor(Function(model)model.FullName)</a></li>
    
</ul>

                    @Code
                        Html.Kendo.Tooltip() _
                    .Content("Test 1") _
                    .Position(TooltipPosition.Top) _
                    .For("#Welcome").Render()
                
                   End Code

@*</nav>*@
</div>
Kiril Nikolov
Telerik team
 answered on 11 Dec 2013
8 answers
331 views
how to column freeze in kendo grid
suppose i have a 3 column in grid.
Name
Address
Address1

I want to Freeze column Name and not applied any kendo grid feature like Dragging,sorting,resizable etc..
it must be always in first place

Thanks
Mayank
Max
Top achievements
Rank 1
 answered on 11 Dec 2013
1 answer
65 views
Hi,  
     I'm using grid with  "reorderable: true", i encounter a problem , when where is no data avaiable, you can not see the column defined in grid, 
 becase you can not  scroll the grid to right. 

    Any suggestion is appreciated.
Kiril Nikolov
Telerik team
 answered on 11 Dec 2013
1 answer
143 views
I have a panel bar with a list of item which have an image and a name. I'm trying to implement kendoDraggable to this Panel bar and what I do is:

$('#teamStatsPage #teamPlayersDiv').kendoDraggable({
        filter: 'li span.k-header',
        hint: function (item) {
 
            //parse HTML to get player ID
            var currentPlayerHTML = $.parseHTML(item.context.innerHTML);
 
            return $(item).clone().css({ background: "#CCCCCC", height: "30px", width: "200px", opacity: "0.5", border: "1px solid #666666", "text-align": "center" }).html(item[0].innerText).attr("data-id",$(currentPlayerHTML)[1].attributes[0].value);
   
        },
        dragend: draggableOnDragEnd,
        dragstart: draggableOnDragStart
    });
In Chrome and IE this is working because on kendoDropTarget I can get the data-id, but in Firefox it doesn't work. 

Each item list have this format:
<span class="k-link k-header"
        <img class="k-image" alt="" src="http://srvprd.blob.core.windows.net/xxx/20110.jpg">
         <span data-id="1302">John</span>
         <span class="k-icon k-i-arrow-s k-panelbar-expand"></span>
</span>

Atanas Korchev
Telerik team
 answered on 11 Dec 2013
1 answer
477 views
I have been annoyed that I don't get any html syntax highlighting in visual studio 2012 within my kendo templates such as:

<script id="my-template" type="text/x-kendo-template">
    <div>.....</div>
 </script>


I found this stackoverflow question that explains you can just use text/html as the type instead of text/x-kendo-template.

This indeed works!

Can you confirm this is a valid workaround and it won't break in the future? Or suggest an alternative?

Thanks

Atanas Korchev
Telerik team
 answered on 11 Dec 2013
6 answers
1.6K+ views
HI , 

I have a requirement to  save and fetch data getting from ODATA service in local storage. I am able to fetch data from ODATA feed  and subsequent create KendoUI DataSource. I am using this DataSource to bind to KendoUI Mobile ListView as following , 

speakerData = new kendo.data.DataSource(
              {
                  type: "odata",
                  transport: {
                      read: {
                          // the remote service url
 
                          url: "http://server/Service.svc/Sessions",
                          dataType: "jsonp",
 
                          data: {
                              Accept: "application/json"
                          }
                      }
                  },
                  serverfiltering: true,
                  serverPaging: true,
                  pageSize: 10,
                  batch: false
              });


i am able to use this DataSource in KendoUI ListView as following , 

$("#speakersView").kendoMobileListView(
               {
                   template: "<strong>${Title }</strong>",
                   dataSource: speakerData
 
               });

Now I am trying to save returned data on local storage as following 

localStorage.setItem('speakerData', JSON.stringify(speakerData.data()));

and creating new  DataSource where I am reading data from local storage not from the ODATA Feed as following 

var ospeakerData = localStorage.getItem('speakerData');
               speakerData1 = JSON.parse(ospeakerData);
               speakerData = new kendo.data.DataSource(
               {
                   transport: {
                       read: function (options) {
                           var data = speakerData1
                           options.success(data);
                       }
                   }
                    
                  
               });


But it seems it is not working .. when I did console.log of JSON.stringify(speakerData.data())  .. it returns ana empty array [].

Please help me to save returned feed from ODATA  or in other words save datasource.data on local storage. 

Thanks 
Dhananjay 

Lino
Top achievements
Rank 2
 answered on 11 Dec 2013
1 answer
76 views
I'm working on a project where accessibility is important. I just discovered that there seems to be no way to use the pager control using the keyboard. I cannot tab to it, nor can I figure out how to go to the next page using the keyboard. I'm using the pager with a ListView.
Dmitri
Top achievements
Rank 1
 answered on 10 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?