Telerik Forums
Kendo UI for jQuery Forum
1 answer
160 views
I have a categoryAxis label that amounts to "Mon 11AM"; I was looking for a way to add a break between the day and time.

Here is how I am currently formatting the categoryAxis:

categoryAxis: {
    field: "date",
    labels: {
        dateFormats: {
            hours: "MMM dd h tt"
        }
    }
}
Thanks.
Iliana Dyankova
Telerik team
 answered on 02 Oct 2013
1 answer
158 views
Using this demo (http://demos.kendoui.com/web/scheduler/selection.html) it is possible to select a single day or multiple days in row (Month view). Is it possible to select multiple dates which do not follow up? For example: 4 october and 12 october.

Thanks in advance!
Vladimir Iliev
Telerik team
 answered on 02 Oct 2013
5 answers
337 views
HI,

I have the following code :
<select id="mlstProdTypes" multiple data-bind="source: prodTypesList, value: filter.prodTypes"
           data-text-field="name" data-value-field="id" class="prodTypesList"></select>




filter.prodTypes is defined as []. Even though I have specified data-value-field, selectedItem { name: "", id: "" }  added to filter.prodTypes instead of adding only the "id"

Please help how to get back only the selected item's data-value-field instead of the selected item ....

Thanks
Aparna



 

 

 

Alexander Valchev
Telerik team
 answered on 02 Oct 2013
1 answer
163 views
If i create an editor widget and set its value to an img tag with a style attribute, the style attribute gets removed when I view the html for the editor (using the "viewHtml" command tool):

<div id="homeBanner" contenteditable="true" style="height: 160px; overflow: hidden; border: 1px dashed red; padding: 0">
    <img src="~/Content/TemplateImages/homeBanner1.png" style="width: 100%" />
</div>
    var bannerEditor = $("#homeBanner").data("kendoEditor");
    bannerEditor.value("<img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />");

Expected edited value: <img alt='' src='/ImageBrowser/Image?path=homeBanner.png' style='width: 100%' />
Actual Result:  <img alt="" src="/ImageBrowser/Image?path=homeBanner.png" width="100" />

style tag is missing and width is missing the '%'.
This does not happen on all tags e.g. <p> does not get modified.
Is there a way to prevent this behavior? I want to set any image added to be 100% width.

Thank you!
Vladimir Iliev
Telerik team
 answered on 02 Oct 2013
1 answer
84 views
Hi,

I am using KendoUI version Q2 2012.
I have added a drpdownlist. I set its SelectedIndex to -1.But when I open a dropdown list it is selecting 0 index by default.
I want to reset selection after every selection.
Following is my code:

@(Html.Kendo().DropDownList()
                                  .Name("BorderWidth")
                                  .HtmlAttributes(new { style = "width: 0px;float:left;" })
                                  .DataTextField("Text")
                                  .DataValueField("Value")
                                  .SelectedIndex(-1)
                                  .Height(150)
                                          .Events(events => events
                                                      .Close("borderWidthChange")
                                                 )
                                  .BindTo(new List<SelectListItem>() {
                                      new SelectListItem() {
                                        Text = "1pt", Value = "1"   
                                      },
                                       new SelectListItem() {
                                        Text = "2pt", Value = "2"   
                                      },
                                       new SelectListItem() {
                                        Text = "3pt", Value = "3"   
                                      },
                                       new SelectListItem() {
                                        Text = "4pt", Value = "4"   
                                      },
                                       new SelectListItem() {
                                        Text = "5pt", Value = "5"   
                                      },
                                       new SelectListItem() {
                                        Text = "6pt", Value = "6"   
                                      }
                                  })
                                
.Template("${ data.Text } " + "<img src=\"" +
Url.Content("~/Content/Images/Line/") + "${data.Text}.png\" />")

                            )

Kindly help.
Petur Subev
Telerik team
 answered on 02 Oct 2013
5 answers
336 views
Hi,

I am trying to specify a value with the menu item when I add it to the menu. When I inspect the menu.dataSource I can see the value I specified during initialization, however I don't see a way to associate the select event's e.item object to the menu.dataSource[N] object that the li was created from.

My goal is to store a value with each menu item that is NOT the text of the menu.

Any guidance is appreciated.

Thanks,

Elan
Kamen Bundev
Telerik team
 answered on 02 Oct 2013
3 answers
293 views
I have two grids on a scrolling div.
<div>
    <table id="grid1">
    ...
    </table>
 
    <table id="grid2">
    ...
    </table>
</div>
 
<script>
  $(document).ready(function() {
    $("#grid1").kendoGrid({
      height: 200,
      scrollable: false
    });
 
    $("#grid2").kendoGrid({
      height: 200,
      scrollable: false
    });
 
  });
</script>
Each div is initialized via tables using the standard grid.KendoGrid({...}) method; however, only one of the grids is styled correctly.
What is missing or otherwise causing the style to fail?  Thanks

I am prototyping this in the following jsFiddle:  http://jsfiddle.net/raltman/wcD28/13/

Dimo
Telerik team
 answered on 02 Oct 2013
3 answers
293 views
I have a grid, approx 500 row in it, using remote data.  The grid is declared in MVC helper, rather than JS, but I don't think that matters in for this issue.

I've added a function which updates some of the values within the grid, that works fine:

//I have already tried using grid.dataSource.data() instead of view(), but it doesn't help)
var dataItems = grid.dataSource.view();
 
for (i = 0; i < dataItems.length; i++) {
var dataItem = dataItems[i];
dataItem.Amount = dataItem.OriginalAmount;
dataItem.IsIncluded = true;
 
dataItem.dirty = true;
}
 
grid.dataSource.fetch();   //This shows the dataSource's changed values in the grid

(I deliberately am not using the dataItem.set() method, because it fires the dataSource.change event repeatedly, which makes the js function bomb out if running on many rows.

So the above function works fine, and updates 500 rows in about half a second, which is acceptable.  

The problem comes when I want to save (sync) the changes.  It takes an age, close to a minute before it even calls the controller action to update (as specified for update in the grid definition).

It does work and save/update, but it needs to be faster.  

Is there a way that doesn't take a minute to hit the controller save/update action?  Or is there a better way of doing this?

Thanks.
Atanas Korchev
Telerik team
 answered on 02 Oct 2013
4 answers
766 views
Hi

I have a TabStrip control on my page but I would like to bind each tab to a separate page as opposed to put all the views in the same page:
<div data-role="footer">
    <div data-role="tabstrip">
        <a href="/Clients" data-icon="contacts">Clients</a>
        <a href="/Home" data-icon="organize">Tickets</a>
        <a href="/Settings" data-icon="settings">Settings</a>
    </div>
</div>
But when I click on the tabs I see strange URL results. For example if I am in <domain>/Clients page and click on Home the URL that is generated will be <domain>/Clients#/Home instead of <domain>/Home.

Could you let me know what I am doing wrong?

Thanks in advance
Ron Farko

Kiril Nikolov
Telerik team
 answered on 02 Oct 2013
2 answers
230 views
I am using Kendo UI Web Grid, not one of the Server Wrappers. I am only displaying a few fields in the grid.
The rest of the fields are displayed in the create or edit popup. For this popup I am using a template:

<script id="popup_editor" type="text/x-kendo-template">
<div class="k-edit-label">
<label for="Title">Title</label>
</div>
<div class="k-edit-field">
<input type="text" class="k-input k-textbox" name="Title" data-bind="value:Title" required>
</div>
</script>

and then I am calling it from the grid:
 editable: {
mode: "popup",
template: $("#popup_editor").html(),
confirmation: "Are you sure?"
}

This works great for input boxes. However I have a foreign key column in my table. I want to display all the options from the foreign key table in a dropdown and select the correct one based on the value in my table. I have searched around quite a bit but haven't been able to find an answer or example to this.

Any help would be greatly appreciated.
Joel
Top achievements
Rank 2
 answered on 01 Oct 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?